;ELC   
;;; Compiled
;;; in Emacs version 30.1
;;; with all optimizations.


#@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
(byte-code "\300\301!\210\300\302!\210\300\301!\210\300\303!\207" [require org-macs cl-lib org-compat] 2)
(defvar org-macro-templates nil (#$ . 84))#@64 Compute the formal arglist to use for TEMPLATE.

(fn TEMPLATE)
(make-variable-buffer-local 'org-macro-templates)
(defalias 'org-macro--makeargs #[257 "\300\211\301\302#\203 \300\225\262\303\304\305\"!]\262\202 \306\305W\203% \306\207\300V\203< \307\310\311\"!B\262S\262\202% \312B\207" [0 string-match "\\$\\([0-9]+\\)" string-to-number match-string 1 (&rest _) intern format "$%d" &optional] 9 (#$ . 532)])#@175 Set template for the macro NAME.
VALUE is the template of the macro.  The new value override the
previous one, unless VALUE is nil.  Return the updated list.

(fn TEMPLATES)
(defalias 'org-macro--set-templates #[257 "\300\211\203i \211@\211\242\243\211\301\";\203C \302\300\303\304$\266\203\203C \305!\30615 \307!A@0\202; \210\310\311\"\312E\262\266\203S \211\203S \211\241\266\202e \211\204c \206] \313BB\262\266A\202 \210\207" [nil assoc "\\`(eval\\>" string-match t org-macro--makeargs (error) read user-error "Invalid definition for macro %S" lambda ""] 16 (#$ . 963)])#@116 Collect macro definitions in current buffer and setup files.
Return an alist containing all macro templates found.
(defalias 'org-macro--collect-macros #[0 "\300\301\302\303\"B\304\301\305!B\306\301\307\303\"B\310\311 BF\312\313!\211:\203` \211\242\211:\203_ \211\242\211\314\232\203^ \243\243\211\204\\ \211\203[ \211@\315\316\"\203V \317\320\"\321\225\322OB\nB\262\n\266\210A\2026 \210\266\210\210\210\207" ["author" org-macro--find-keyword-value "AUTHOR" t "email" "EMAIL" "title" "TITLE" "date" org-macro--find-date org-collect-keywords ("MACRO") "MACRO" string-match "^\\(\\S-+\\)[ 	]*" match-string 1 0 nil] 12 (#$ . 1571)])#@416 Collect macro templates defined in current buffer.

DEFAULT is a list of globally available templates.

Templates are stored in buffer-local variable `org-macro-templates'.

In addition to buffer-defined macros, the function installs the
following ones: "n", "author", "email", "keyword",
"time", "property", and, if the buffer is associated to
a file, "input-file" and "modification-time".

(fn &optional DEFAULT)#@36 

(fn ARG1 &optional ARG2 &rest _)
(defalias 'org-macro-initialize-templates #[256 "\301\302!\210\303 \210\304\305\306 \"!\307\310 !\211\2054 \311!\2054 \312\313!B\314\315!\3168\262\317\320#\262BD\262\244\321\244\211\207" [org-macro-templates require org-element org-macro--counter-initialize org-macro--set-templates append org-macro--collect-macros buffer-file-name buffer-base-buffer file-exists-p "input-file" file-name-nondirectory "modification-time" file-attributes 5 make-closure #[641 "\302\303!\203 \304\301!\206 \300\"\207" [V0 V1 format-time-string org-string-nw-p org-macro--vc-modified-time] 7 (#$ . 2639)] (("keyword" lambda (arg1 &rest _) (org-macro--find-keyword-value arg1 t)) ("n" lambda (&optional arg1 arg2 &rest _) (org-macro--counter-increment arg1 arg2)) ("property" lambda (arg1 &optional arg2 &rest _) (org-macro--get-property arg1 arg2)) ("time" lambda (arg1 &rest _) (format-time-string arg1)))] 10 (#$ . 2219)])#@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)#@10 

(fn M)
(defalias 'org-macro-expand #[514 "\300\301\302\"\303#A\211\2053 \304!\203 \305\301\306\"\"\202) \307\310\311\312\"\313\314%\315\316\2060 \317\"\262\207" [assoc-string org-element-property :key t functionp apply :args replace-regexp-in-string "\\$[0-9]+" make-closure #[257 "\301\302\303O!S\304\305\300\"8\206 \306\207" [V0 string-to-number 1 nil org-element-property :args #1=""] 5 (#$ . 3891)] nil literal format "%s" #1#] 9 (#$ . 3602)])#@414 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.

Optional argument KEYWORDS, when non-nil is a list of keywords,
as strings, where macro expansion is allowed.

Return an error if a macro in the buffer cannot be associated to
a definition in TEMPLATES.

(fn TEMPLATES &optional KEYWORDS)
(defalias 'org-macro-replace-all #[513 "\212\214~\210eb\210\300\301\302!\"\303\304\305\303\306#\205\326 \307 \310\311\"\216\312 )\262\204 \307 \310\313\"\216\314 )\262\315!\211\316=\203> \202l \211\317=\203M \320\321\"\235\204d \211\322=\205l \320\321\"\303\323\306$\266\203\205l \212\324\224b\210\325 )\211\203\321 \326!\262\327\330\303#\210\320\321\"\331	\"\332!\211\320\333\"E\211\235\203\237 \334\335\"\266\202 \203\300 \211B\262\336!b\210\337\303x\210`|\210\212c)\266\202 \340\232\204\317 \334\341\320\321\"\"\210\266\266\202 *\207" [format "\\`EXPORT_%s\\+?\\'" regexp-opt nil re-search-forward "{{{[-A-Za-z0-9_]" t match-data make-closure #[0 "\301\300\302\"\207" [V0 set-match-data t] 3] org-in-commented-heading-p #[0 "\301\300\302\"\207" [V0 set-match-data t] 3] org-element-context org-element-type macro keyword org-element-property :key node-property string-match 0 org-element-macro-parser cl-copy-list org-element-put-property :parent org-macro-expand org-element-begin :args error "Circular macro expansion: %s" org-element-end " 	" "results" "Undefined Org macro: %s; aborting"] 16 (#$ . 4361)])#@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\2031 \211@\302\303\304\305\300\232?\205$ \306\307\"\205$ \310\311\"P\312\313%Q\262\210A\202 \314\312O\207" ["" reverse "," replace-regexp-in-string "\\(\\\\*\\)," #[257 "\300\301\302\"G\303_T\304\"\305P\207" [make-string match-string 1 2 92 ","] 5 (#$ . 3891)] string-match "\\\\+\\'" match-string 0 nil t 1] 12 (#$ . 5939)])#@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)#@12 

(fn STR)
(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 " " ","] 6 (#$ . 6774)] nil t " "] 8 (#$ . 6561)])#@167 Find PROPERTY's value at LOCATION.
PROPERTY is a string.  LOCATION is a search string, as expected
by `org-link-search', or the empty string.

(fn PROPERTY LOCATION)
(defalias 'org-macro--get-property #[514 "\212\214~\210\301!\203! \3021 \303\304\305\303#)0\210\202! \306\307\"\266\310\305\311#*\207" [org-link-search-must-match-exact-headline org-string-nw-p (error) t org-link-search nil error "Macro property failed: cannot find location %s" org-entry-get selective] 6 (#$ . 7100)])#@281 Find value for keyword NAME in current buffer.
Return value associated to the keywords named after NAME, as
a string, or nil.  When optional argument COLLECT is non-nil,
concatenate values, separated with a space, from various keywords
in the buffer.

(fn NAME &optional COLLECT)
(defalias 'org-macro--find-keyword-value #[513 "\301\212\212\214~\210\211\206 `b\210\302\303\304!\"\305\306\3072\273\310\306\305#\203\240\311\224\212\312!\2034 \313!q\210\202c\211\247\204c\314!\211\315\267\202L \210\306\202f \210\306\202f A@@\316=\203^ \210\211A@A@\202f \317A@\316\"\262\211\203z \211\320H\211\321=?\205u \211\266\202\202\232 \314!\211\322\267\202\222 \266\202\323\311\324#\266\202\202\232 \317A@\324\"\266\202\203\314!\211\325\267\202\260 \210\306\202\312 \210\306\202\312 A@@\316=\203\302 \210\211A@A@\202\312 \317A@\316\"\262\211\203\336 \211\320H\211\321=?\205\331 \211\266\202\202\377 \314!\211\326\267\202\367 \266\306\202\377 \323\311\324#\266\202\202\377 \317A@\324\"\266\202q\210\314!\211\327\267\202\210\306\202.\210\306\202.A@@\316=\203&\210\211A@A@\202.\317A@\316\"\262\211\203B\211\311H\211\321=?\205=\211\266\203\202c\314!\211\330\267\202[\266\306\202c\323\311\331#\266\203\202c\317A@\331\"\266\203\212\214~\210\211\206l`b\210\332\333 \311\224C\"+\262\314\305\"\334=\203\234\335\336\306\211$\204\225\337\307\"\266\202 \340Q\262\210\210\202 \211\205\272\211\306\341\203\257\342\202\260\343\344\341\345\344##\266\2020,\207" [case-fold-search 1 format "^[ 	]*#\\+%s:" regexp-quote t nil :exit re-search-forward 0 markerp marker-buffer org-element-type #s(hash-table test eq purecopy t data (nil 66 plain-text 71)) :standard-properties plist-get 14 org-element-ast--nil #s(hash-table test eq purecopy t data (nil 131 plain-text 136)) get-text-property :buffer #s(hash-table test eq purecopy t data (nil 166 plain-text 171)) #s(hash-table test eq purecopy t data (nil 231 plain-text 237)) #s(hash-table test eq purecopy t data (nil 266 plain-text 271)) #s(hash-table test eq purecopy t data (nil 331 plain-text 337)) :begin org-element-keyword-parser line-end-position keyword org-element--property :value throw " " replace-regexp-in-string "\\`\\([ 	]*\n\\)+" "\\`[ 	\n]+" "" "[ 	\n]+\\'"] 15 (#$ . 7599)])#@66 Find value for DATE in current buffer.
Return value as a string.
(defalias 'org-macro--find-date #[0 "\301\302!\303\304\305!\"\211:\203\315 \211A\204\315 \211@\306\307\"\310=\262\203\315 \311\312\311\313\314@!\306\307\"\315=\203< \316\317\320\317$\262\202\311 \306!\211\321\267\202M \210\202j \210\202j A@@\322=\203_ \210\211A@A@\202g \323A@\322\"\262\206\277 \317\306!\324>?\205\275 \325\326\317\"\262\211\203\260 A@@\306!\211\327\267\202\240 \266\317\202\251 \330\331	#\266\202\202\251 \323A@\"\266\202I\210AA\202{ \210A\322DA@\244\240\210\211\262\211\203\310 \211\332\317I\210\210\"#\207\207" [org-element--standard-properties-idxs org-macro--find-keyword-value "DATE" org-element-parse-secondary-string org-element-restriction keyword org-element-type t timestamp format "(eval (if (org-string-nw-p $1) %s %S))" "(org-format-timestamp '%S $1)" org-element-copy plain-text org-add-props nil :buffer #s(hash-table test eq purecopy t data (nil 69 plain-text 73)) :standard-properties plist-get (plain-text nil) make-vector 18 #s(hash-table test eq purecopy t data (nil 143 plain-text 149)) get-text-property 0 14] 17 (#$ . 9892)])#@13 

(fn FILE)
(defalias 'org-macro--vc-modified-time #[257 "\301\302!\210\303 \304\305\"\216\306!\205R \307\310!\311\312C\304\313\"\216C\314\306!\315\312\211\316&\266rq\210\317\304\320\"!)\210\321!\211\203K \322\323\312\311$\204> )\210\211\242)\266\203)\207" [case-fold-search require vc current-window-configuration make-closure #[0 "\301\300!\207" [V0 set-window-configuration] 2] vc-backend get-buffer-create " *org-vc*" t nil #[0 "\301\300!\207" [V0 kill-buffer] 2] vc-call-backend print-log 1 vc-exec-after #[0 "eb\210\301\302\303\304#\205 \305`\306 {!\307\310\"\205 \300\311!\240\262\207" [V0 re-search-forward "Date:?[ 	]*" nil t parse-time-string line-end-position cl-some identity encode-time] 4] get-buffer-process accept-process-output 0.5] 14 (#$ . 11060)])#@47 Hash table containing counter value per name.
(defvar org-macro--counter-table nil (#$ . 11854))#@40 Initialize `org-macro--counter-table'.
(defalias 'org-macro--counter-initialize #[0 "\301\302\303\"\211\207" [org-macro--counter-table make-hash-table :test equal] 3 (#$ . 11956)])#@361 Increment counter NAME.
NAME is a string identifying the counter.

When non-nil, optional argument ACTION is a string.

If the string is "-", keep the NAME counter at its current
value, i.e. do not increment.

If the string represents an integer, set the counter to this number.

Any other non-empty string resets the counter to 1.

(fn NAME &optional ACTION)
(defalias 'org-macro--counter-increment #[513 ";\203 \301\302\203 \303\202 \304\305\302\306\305##\266\202\202 \305\307!\205; \301\302\2030 \303\2021 \304\305\302\306\305##\266\202\310\307!\204L \311\312#T\202o \313\230\203Z \311\314#\202o \315\301\316\317$\266\203\203n \320!\202o \314#\207" [org-macro--counter-table nil replace-regexp-in-string "\\`\\([ 	]*\n\\)+" "\\`[ 	\n]+" "" "[ 	\n]+\\'" org-string-nw-p puthash gethash 0 "-" 1 "\\`[0-9]+\\'" string-match t string-to-number] 14 (#$ . 12144)])
(provide 'org-macro)
