File: org-macro.el.html
Macros are expanded with org-macro-replace-all, which relies
internally on org-macro-expand.
Default templates for expansion are stored in the buffer-local
variable org-macro-templates. This variable is updated by
org-macro-initialize-templates, which recursively calls
org-macro--collect-macros in order to read setup files.
Argument in macros are separated with commas. Proper escaping rules
are implemented in org-macro-escape-arguments and arguments can
be extracted from a string with org-macro-extract-arguments.
Along with macros defined through #+MACRO: keyword, default
templates include the following hard-coded macros:
{{{time(format-string)}}},
{{{property(node-property)}}},
{{{input-file}}},
{{{modification-time(format-string)}}},
{{{n(counter,action}}}.
Upon exporting, "ox.el" will also provide {{{author}}}, {{{date}}},
{{{email}}} and {{{title}}} macros.
Defined variables (2)
org-macro--counter-table | Hash table containing counter value per name. |
org-macro-templates | Alist containing all macro templates in current buffer. |
Defined functions (14)
org-macro--collect-macros | () |
org-macro--counter-increment | (NAME &optional ACTION) |
org-macro--counter-initialize | () |
org-macro--find-date | () |
org-macro--find-keyword-value | (NAME &optional COLLECT) |
org-macro--get-property | (PROPERTY LOCATION) |
org-macro--makeargs | (TEMPLATE) |
org-macro--set-templates | (TEMPLATES) |
org-macro--vc-modified-time | (FILE) |
org-macro-escape-arguments | (&rest ARGS) |
org-macro-expand | (MACRO TEMPLATES) |
org-macro-extract-arguments | (S) |
org-macro-initialize-templates | (&optional DEFAULT) |
org-macro-replace-all | (TEMPLATES &optional KEYWORDS) |