- publishing free software manuals
The Org Mode 7 Reference Manual
by Carsten Dominik and others
Paperback (6"x9"), 282 pages
ISBN 9781906966089
RRP £9.95 ($14.95)

Sales of this book support the Org project! Get a printed copy>>>

16.2 Easy Templates

Org-mode supports insertion of empty structural elements (like #+BEGIN_SRC and #+END_SRC pairs) with just a few key strokes. This is achieved through a native template expansion mechanism. Note that Emacs has several other template mechanisms which could be used in a similar way, for example ‘yasnippet’.

To insert a structural element, type a ‘<’, followed by a template selector and TAB. Completion takes effect only when the above keystrokes are typed on a line by itself.

The following template selectors are currently supported.

s #+begin_src ... #+end_src
e #+begin_example ... #+end_example
q #+begin_quote ... #+end_quote
v #+begin_verse ... #+end_verse
c #+begin_center ... #+end_center
l #+begin_latex ... #+end_latex
L #+latex:
h #+begin_html ... #+end_html
H #+html:
a #+begin_ascii ... #+end_ascii
A #+ascii:
i #+include: line
For example, on an empty line, typing "<e" and then pressing TAB, will expand into a complete EXAMPLE template. You can install additional templates by customizing the variable org-structure-template-alist. See the docstring of the variable for additional details.
ISBN 9781906966089The Org Mode 7 Reference ManualSee the print edition