On Fri, Apr 16, 2010 at 9:35 PM, Dan Davison <davi...@stats.ox.ac.uk> wrote:

> Nathan Neff <nathan.n...@gmail.com> writes:
>
> > On Fri, Apr 16, 2010 at 8:18 PM, Nathan Neff <nathan.n...@gmail.com>
> wrote:
> >
> >     I've been converting my init.el file to org-babel, and am getting
> tired of
> >     copying/pasting or typing the begin_src and end_src blocks.
> >
> >     Example:
> >     #+begin_src emacs-lisp :results silent
> >     #+end_src
>
> Hi Nate,
>
> By the way, if you are using :results silent for all your blocks, then
> you can just enter it once as a buffer property:
>
> #+property: results silent
>
> (and if you want it for a whole subtree but not a whole buffer, then set
> a property called :results: with value silent in the root of the
> subtree).
>
> I agree with the others about using yasnippets for blocks. I have src
> and elisp snippets (although to be honest I still haven't learned the
> syntax for defining them and I have trouble stopping them leaving
> annoying trailing spaces...ok thanks you made me fix that, although I
> still don't know the syntax, something like this then
>
> src:
>
> #+begin_src...#+end_src
> # --
> #+begin_src ${2:language}
> $0
> #+end_src
>
> elisp:
>
> #name : #+begin_src...#+end_src
> # --
> #+begin_src emacs-lisp
> $0
> #+end_src
>
>
>
Thanks!  I'm having trouble triggering the yasnippets using the TAB key, so
I'm just using the GUI menu.

Do you literally type "src" (no quotes), then press Tab?

--Nate
_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

Reply via email to