|
@@ -749,7 +749,7 @@ Specific header arguments
|
|
|
Miscellaneous
|
|
|
|
|
|
* Completion:: M-TAB guesses completions
|
|
|
-* Easy templates:: Quick insertion of structural elements
|
|
|
+* Structure templates:: Quick insertion of structural elements
|
|
|
* Speed keys:: Electric commands at the beginning of a headline
|
|
|
* Code evaluation security:: Org mode files evaluate inline code
|
|
|
* Customization:: Adapting Org to changing tastes
|
|
@@ -10108,18 +10108,16 @@ look like the fontified Emacs buffer@footnote{This works automatically for
|
|
|
the HTML back-end (it requires version 1.34 of the @file{htmlize.el} package,
|
|
|
which you need to install). Fontified code chunks in @LaTeX{} can be
|
|
|
achieved using either the
|
|
|
-@url{https://www.ctan.org/tex-archive/macros/latex/contrib/listings/?lang=en, listings,}
|
|
|
-or the
|
|
|
-@url{https://github.com/gpoore/minted, minted,} package.
|
|
|
+@url{https://www.ctan.org/tex-archive/macros/latex/contrib/listings/?lang=en,
|
|
|
+listings,} or the @url{https://github.com/gpoore/minted, minted,} package.
|
|
|
If you use minted or listing, you must load the packages manually, for
|
|
|
-example by adding the desired package to
|
|
|
-@code{org-latex-packages-alist}. Refer to @code{org-latex-listings}
|
|
|
-for details.}. This is done with the @samp{src} block, where you also need
|
|
|
-to specify the name of the major mode that should be used to fontify the
|
|
|
-example@footnote{Code in @samp{src} blocks may also be evaluated either
|
|
|
-interactively or on export. @xref{Working with source code}, for more
|
|
|
-information on evaluating code blocks.}, see @ref{Easy templates} for
|
|
|
-shortcuts to easily insert code blocks.
|
|
|
+example by adding the desired package to @code{org-latex-packages-alist}.
|
|
|
+Refer to @code{org-latex-listings} for details.}. This is done with the
|
|
|
+@samp{src} block, where you also need to specify the name of the major mode
|
|
|
+that should be used to fontify the example@footnote{Code in @samp{src} blocks
|
|
|
+may also be evaluated either interactively or on export. @xref{Working with
|
|
|
+source code}, for more information on evaluating code blocks.}, see
|
|
|
+@ref{Structure templates} for shortcuts to easily insert code blocks.
|
|
|
@cindex #+BEGIN_SRC
|
|
|
|
|
|
@example
|
|
@@ -10185,9 +10183,8 @@ If the syntax for the label format conflicts with the language syntax, use a
|
|
|
HTML export also allows examples to be published as text areas (@pxref{Text
|
|
|
areas in HTML export}).
|
|
|
|
|
|
-Because the @code{#+BEGIN_...} and @code{#+END_...} patterns need to be added
|
|
|
-so often, shortcuts are provided using the Easy templates facility
|
|
|
-(@pxref{Easy templates}).
|
|
|
+Because the @code{#+BEGIN_...} @dots{} @code{#+END_...} patterns need to be
|
|
|
+added so often, a shortcut is provided (@pxref{Structure templates}).
|
|
|
|
|
|
@table @kbd
|
|
|
@kindex C-c '
|
|
@@ -15243,12 +15240,12 @@ A @samp{src} block conforms to this structure:
|
|
|
#+END_SRC
|
|
|
@end example
|
|
|
|
|
|
-Org mode's templates system (@pxref{Easy templates}) speeds up creating
|
|
|
-@samp{src} code blocks with just three keystrokes. Do not be put-off by
|
|
|
-having to remember the source block syntax. Org also works with other
|
|
|
-completion systems in Emacs, some of which predate Org and have custom
|
|
|
-domain-specific languages for defining templates. Regular use of templates
|
|
|
-reduces errors, increases accuracy, and maintains consistency.
|
|
|
+Do not be put-off by having to remember the source block syntax. Org mode
|
|
|
+offers a command for wrapping existing text in a block (@pxref{Structure
|
|
|
+templates}). Org also works with other completion systems in Emacs, some of
|
|
|
+which predate Org and have custom domain-specific languages for defining
|
|
|
+templates. Regular use of templates reduces errors, increases accuracy, and
|
|
|
+maintains consistency.
|
|
|
|
|
|
@cindex source code, inline
|
|
|
An inline code block conforms to this structure:
|
|
@@ -17299,7 +17296,7 @@ emacs -Q --batch --eval "
|
|
|
|
|
|
@menu
|
|
|
* Completion:: M-TAB guesses completions
|
|
|
-* Easy templates:: Quick insertion of structural elements
|
|
|
+* Structure templates:: Quick insertion of structural elements
|
|
|
* Speed keys:: Electric commands at the beginning of a headline
|
|
|
* Code evaluation security:: Org mode files evaluate inline code
|
|
|
* Customization:: Adapting Org to changing tastes
|
|
@@ -17374,46 +17371,40 @@ If your desktop intercepts the combo @kbd{M-@key{TAB}} to switch windows, use
|
|
|
environment.
|
|
|
@end table
|
|
|
|
|
|
-@node Easy templates
|
|
|
-@section Easy templates
|
|
|
+@node Structure templates
|
|
|
+@section Structure templates
|
|
|
@cindex template insertion
|
|
|
@cindex insertion, of templates
|
|
|
|
|
|
-With just a few keystrokes, Org's easy templates inserts empty pairs of
|
|
|
-structural elements, such as @code{#+BEGIN_SRC} and @code{#+END_SRC}. Easy
|
|
|
-templates use an expansion mechanism, which is native to Org, in a process
|
|
|
-similar to @file{yasnippet} and other Emacs template expansion packages.
|
|
|
+With just a few keystrokes, it is possible to insert empty structural blocks,
|
|
|
+such as @samp{#+BEGIN_SRC} @dots{} @samp{#+END_SRC}, or to wrap existing text
|
|
|
+in such a block.
|
|
|
|
|
|
-@kbd{<} @kbd{s} @kbd{@key{TAB}} expands to a @samp{src} code block.
|
|
|
-
|
|
|
-@kbd{<} @kbd{l} @kbd{@key{TAB}} expands to:
|
|
|
-
|
|
|
-#+BEGIN_EXPORT latex
|
|
|
-
|
|
|
-#+END_EXPORT
|
|
|
+@table @kbd
|
|
|
+@orgcmd{C-c C-x w,org-insert-structure-template}
|
|
|
+Prompt for a type of block structure, and insert the block at point. If the
|
|
|
+region is active, it is wrapped in the block. First prompts the user for
|
|
|
+a key, which is used to look up a structure type from the values below. If
|
|
|
+the key is @key{TAB}, the user is prompted to enter a type.
|
|
|
+@end table
|
|
|
|
|
|
-Org comes with these pre-defined easy templates:
|
|
|
-
|
|
|
-@multitable @columnfractions 0.1 0.9
|
|
|
-@item @kbd{s} @tab @code{#+BEGIN_SRC ... #+END_SRC}
|
|
|
-@item @kbd{e} @tab @code{#+BEGIN_EXAMPLE ... #+END_EXAMPLE}
|
|
|
-@item @kbd{q} @tab @code{#+BEGIN_QUOTE ... #+END_QUOTE}
|
|
|
-@item @kbd{v} @tab @code{#+BEGIN_VERSE ... #+END_VERSE}
|
|
|
-@item @kbd{c} @tab @code{#+BEGIN_CENTER ... #+END_CENTER}
|
|
|
-@item @kbd{C} @tab @code{#+BEGIN_COMMENT ... #+END_COMMENT}
|
|
|
-@item @kbd{l} @tab @code{#+BEGIN_EXPORT latex ... #+END_EXPORT}
|
|
|
-@item @kbd{L} @tab @code{#+LATEX:}
|
|
|
-@item @kbd{h} @tab @code{#+BEGIN_EXPORT html ... #+END_EXPORT}
|
|
|
-@item @kbd{H} @tab @code{#+HTML:}
|
|
|
-@item @kbd{a} @tab @code{#+BEGIN_EXPORT ascii ... #+END_EXPORT}
|
|
|
-@item @kbd{A} @tab @code{#+ASCII:}
|
|
|
-@item @kbd{i} @tab @code{#+INDEX:} line
|
|
|
-@item @kbd{I} @tab @code{#+INCLUDE:} line
|
|
|
+@vindex org-structure-template-alist
|
|
|
+Available structure types are defined in @code{org-structure-template-alist},
|
|
|
+see the docstring for adding or changing values.
|
|
|
+
|
|
|
+@multitable @columnfractions 0.2 0.8
|
|
|
+@item @kbd{c} @tab @samp{#+BEGIN_CENTER}
|
|
|
+@item @kbd{C} @tab @samp{#+BEGIN_COMMENT}
|
|
|
+@item @kbd{e} @tab @samp{#+BEGIN_EXAMPLE}
|
|
|
+@item @kbd{E} @tab @samp{#+BEGIN_EXPORT}
|
|
|
+@item @kbd{a} @tab @samp{#+BEGIN_EXPORT ascii}
|
|
|
+@item @kbd{h} @tab @samp{#+BEGIN_EXPORT html}
|
|
|
+@item @kbd{l} @tab @samp{#+BEGIN_EXPORT latex}
|
|
|
+@item @kbd{s} @tab @samp{#+BEGIN_SRC}
|
|
|
+@item @kbd{q} @tab @samp{#+BEGIN_QUOTE}
|
|
|
+@item @kbd{v} @tab @samp{#+BEGIN_VERSE}
|
|
|
@end multitable
|
|
|
|
|
|
-More templates can added by customizing the variable
|
|
|
-@code{org-structure-template-alist}, whose docstring has additional details.
|
|
|
-
|
|
|
@node Speed keys
|
|
|
@section Speed keys
|
|
|
@cindex speed keys
|