;ELC
;;; Compiled
;;; in Emacs version 26.1
;;; with all optimizations.
;;; This file uses dynamic docstrings, first added in Emacs 19.29.
;;; This file does not contain utf-8 non-ASCII characters,
;;; and so can be loaded in Emacs versions earlier than 23.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(byte-code "\300\301!\210\300\302!\210\300\303!\207" [require cl-lib org-macs org-compat] 2)
#@295 Alist containing all macro templates in current buffer.
Associations are in the shape of (NAME . TEMPLATE) where NAME
stands for macro's name and template for its replacement value,
both as strings. This is an internal variable. Do not set it
directly, use instead:
#+MACRO: name template
(defvar org-macro-templates nil (#$ . 502))
(make-variable-buffer-local 'org-macro-templates)
#@116 Collect macro definitions in current buffer and setup files.
Return an alist containing all macro templates found.
(defalias 'org-macro--collect-macros #[0 "\300C\211\301\302\303\304\305!\306\"\307\310%\240\210\211\242\300\211\"\207" [nil make-byte-code 514 "\303\212\214~\210eb\210\304\305\306\303#\203\254 \307 \310!\311=\203\250 \312\313\"\312\314\"\315\232\203X \316\317\"\203\247 \320\321\"\320\322\"\206; \323\324\"\211\203K \211\241\210\202S BB\262\266\202\247 \325\326\211\327!#\330!\211\203j \202m \331!\211\235\204\245 \332\333!r\211q\210\334\335\336\337\340!\341\"\322$\216\204\217 \342!\343 \210\344\345\"c\210\300\242 B\"\262*\210\266\210\210\202 +\207" vconcat vector [case-fold-search default-directory t re-search-forward "^[ ]*#\\+\\(MACRO\\|SETUPFILE\\):" nil org-element-at-point org-element-type keyword org-element-property :value :key "MACRO" string-match "^\\(.*?\\)\\(?:\\s-+\\(.*\\)\\)?\\s-*$" match-string 1 2 "" assoc org-unbracket-string "\"" org-trim org-file-url-p expand-file-name generate-new-buffer " *temp*" make-byte-code 0 "\301\300!\205 \302\300!\207" vconcat vector [buffer-name kill-buffer] file-name-directory org-mode org-file-contents noerror] 14 "\n\n(fn FILES TEMPLATES)"] 8 (#$ . 897)])
#@304 Collect macro templates defined in current buffer.
Templates are stored in buffer-local variable
`org-macro-templates'. In addition to buffer-defined macros, the
function installs the following ones: "property",
"time". and, if the buffer is associated to a file,
"input-file" and "modification-time".
(defalias 'org-macro-initialize-templates #[0 "\301C\302\303\304\305\306!\307\"\310\311%\312\313\314B\315\316BD\"\210\317\320 !\211\203B \321!\203B \312\322\323!B\324\325\326\327!\327\310\330\n!8!#BD\"\210\210\331 \210\211\332\333B!\210\334 \242\244\211\207" [org-macro-templates nil make-byte-code 257 "\301@\300\242\"\211\203 \211A\241\202 \300\300\242B\240\207" vconcat vector [assoc] 5 "\n\n(fn CELL)" mapc "property" "(eval (save-excursion\n (let ((l \"$2\"))\n (when (org-string-nw-p l)\n (condition-case _\n (let ((org-link-search-must-match-exact-headline t))\n (org-link-search l nil t))\n (error\n (error \"Macro property failed: cannot find location %s\"\n l)))))\n (org-entry-get nil \"$1\" 'selective)))" "time" "(eval (format-time-string \"$1\"))" buffer-file-name buffer-base-buffer file-exists-p "input-file" file-name-nondirectory "modification-time" format "(eval (format-time-string \"$1\" (or (and (org-string-nw-p \"$2\") (org-macro--vc-modified-time %s)) '%s)))" prin1-to-string file-attributes org-macro--counter-initialize "n" "(eval (org-macro--counter-increment \"$1\" \"$2\"))" org-macro--collect-macros] 14 (#$ . 2175)])
#@285 Return expanded MACRO, as a string.
MACRO is an object, obtained, for example, with
`org-element-context'. TEMPLATES is an alist of templates used
for expansion. See `org-macro-templates' for a buffer-local
default value. Return nil if no template was found.
(fn MACRO TEMPLATES)
(defalias 'org-macro-expand #[514 "\300\301\302\"\303#A\211\2058 \304\305\306\307\310\311\312 !\313\"\314\315%\316\317%\320\321\"\203. \322\323!!\262\324\325\2065 \326\"\262\207" [assoc-string org-element-property :key t replace-regexp-in-string "\\$[0-9]+" make-byte-code 257 "\301\302\303O!S\304\305\300\"8\206 \306\207" vconcat vector [string-to-number 1 nil org-element-property :args #1=""] 5 "\n\n(fn ARG)" nil literal string-match "\\`(eval\\>" eval read format "%s" #1#] 11 (#$ . 3763)])
#@450 Replace all macros in current buffer by their expansion.
TEMPLATES is an alist of templates used for expansion. See
`org-macro-templates' for a buffer-local default value.
If optional arg FINALIZE is non-nil, raise an error if a macro is
found in the buffer with no definition in TEMPLATES.
Optional argument KEYWORDS, when non-nil is a list of keywords,
as strings, where macro expansion is allowed.
(fn TEMPLATES &optional FINALIZE KEYWORDS)
(defalias 'org-macro-replace-all #[769 "\212\214~\210eb\210\301\302\303!\"\304\305\306\304\307#\205\332 \310 \311\312\313\314\315!\316\"\317$\216\320 )\262\204 \310 \311\312\313\314\315!\321\"\317$\216\322 )\262\323!\211\324=\203L \202| \211\325=\203[ \326\327\"\235\204t \211\330=\205| \326\327\"\304\307\331#)\266\203\205| \212\312\224b\210\332 )\211\203\325 \333 \"\326\334\"\211\326\335\"E\211\235\203\244 \336\337\326\327\"\"\210\202\323 \203\305 \211B\262\326\340\"b\210\341\304x\210`|\210\212c\210)\202\323 \203\323 \336\342\326\327\"\"\210\266\266\202 \266\202*\207" [inhibit-changing-match-data format "\\`EXPORT_%s\\+?\\'" regexp-opt nil re-search-forward "{{{[-A-Za-z0-9_]" t match-data make-byte-code 0 "\301\300\302\"\207" vconcat vector [set-match-data evaporate] 3 org-in-commented-heading-p [set-match-data evaporate] org-element-context org-element-type macro keyword org-element-property :key node-property string-match org-element-macro-parser org-macro-expand :begin :args error "Circular macro expansion: %s" :end " " "Undefined Org macro: %s; aborting"] 16 (#$ . 4561)])
#@219 Build macro's arguments string from ARGS.
ARGS are strings. Return value is a string with arguments
properly escaped and separated with commas. This is the opposite
of `org-macro-extract-arguments'.
(fn &rest ARGS)
(defalias 'org-macro-escape-arguments #[128 "\300\301!\211\2033 \211@\302\303\304\305\300\232?\205$ \306\307\"\205$ \310\311\"P\312\313%Q\262A\266\202\202 \314\312O\262\207" ["" reverse "," replace-regexp-in-string "\\(\\\\*\\)," #[257 "\300\301\302\"G\303_T\304\"\305P\207" [make-string match-string 1 2 92 ","] 5 "\n\n(fn M)"] string-match "\\\\+\\'" match-string 0 nil t 1] 12 (#$ . 6152)])
#@209 Extract macro arguments from string S.
S is a string containing comma separated values properly escaped.
Return a list of arguments, as strings. This is the opposite of
`org-macro-escape-arguments'.
(fn S)
(defalias 'org-macro-extract-arguments #[257 "\300\301\302\303\304\305%\306\"\207" [split-string replace-regexp-in-string "\\(\\\\*\\)," #[257 "\300\301\"G\302\303\245\304\"\305\303\"\306U\203 \307\202 \310P\207" [match-string 1 make-string 2 92 mod 0 " |