%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/local/share/emacs/27.2/lisp/org/
Upload File :
Create Path :
Current File : //usr/local/share/emacs/27.2/lisp/org/org-macro.elc

;ELC
;;; Compiled
;;; in Emacs version 27.2
;;; 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)
#@223 Set template for the macro NAME.
VALUE is the template of the macro.  The new value override the
previous one, unless VALUE is nil.  TEMPLATES is the list of
templates.  Return the updated list.

(fn NAME VALUE TEMPLATES)
(defalias 'org-macro--set-template #[771 "\300\"\203\211\203\211\241\210\202\"\211\204\"\206\301BB\262\210\207" [assoc ""] 6 (#$ . 897)])
#@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!\211:\203O\211@\211:\203N\211@\211\303\232\203MAA\211\204K\211\211\203I\211@\304\305\"\203B\306\307\"\310\311\225\"\312
#\262\266A\266\202\202\"\266\266\210\210\210\313\314\315!B\316\314\317!B\320\314\321\322\"B\323\324 BF\211\211\203\203\211@\211@A\211\312\n#\262\266A\266\202\202f\266\211\207" [nil org-collect-keywords ("MACRO") "MACRO" string-match "^\\(\\S-+\\)[ 	]*" match-string 1 substring 0 org-macro--set-template "author" org-macro--find-keyword-value "AUTHOR" "email" "EMAIL" "title" "TITLE" t "date" org-macro--find-date] 15 (#$ . 1280)])
#@340 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: "n", "author", "email", "keyword",
"time", "property", and, if the buffer is associated to
a file, "input-file" and "modification-time".
(defalias 'org-macro-initialize-templates #[0 "\301\302!\210\303 \210\304 \305\306 !\211\2050\307!\2050\310\311!B\312\313\314\315!\315\316!\3178\262!#BD\262\244\320\321\322\323F\244\211\207" [org-macro-templates require org-element org-macro--counter-initialize org-macro--collect-macros buffer-file-name buffer-base-buffer file-exists-p "input-file" file-name-nondirectory "modification-time" format "(eval\n(format-time-string $1\n                     (or (and (org-string-nw-p $2)\n                              (org-macro--vc-modified-time %s))\n                     '%s)))" prin1-to-string file-attributes 5 ("n" . "(eval (org-macro--counter-increment $1 $2))") ("keyword" . "(eval (org-macro--find-keyword-value $1))") ("time" . "(eval (format-time-string $1))") ("property" . "(eval (org-macro--get-property $1 $2))")] 11 (#$ . 2041)])
#@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 "\301\302\303\"\304#A\211\205O\305\306\304\307#)\266\203\310\311\312\313\314\315\316\n\"\317\"\320\321%\306\322%\203E\323\3241?\325!0\202B\210\326 !\262\327\330\206L\331\"\266\202\207" [inhibit-changing-match-data assoc-string org-element-property :key t "\\`(eval\\>" nil string-match replace-regexp-in-string "\\$[0-9]+" make-byte-code 257 "\302\303\304\"!S\305\306\300\"8\206\307\301\203\310\311\"\202\211\207" vconcat vector [string-to-number substring 1 org-element-property :args #1="" format "%S"] 5 "\n\n(fn M)" literal eval (error) read debug format "%s" #1#] 13 (#$ . 3241)])
#@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\301\302\303!\"\304\305\306\304\307#\205\333\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\326\326\327\"\333	\"\326\334\"\211\326\335\"E\211\235\203\244\336\337\"\210\202\324\203\305\211B\262\326\340\"b\210\341\304x\210`|\210\212c\210)\202\324\342\232\204\324\336\343\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 " 	" "results" "Undefined Org macro: %s; aborting"] 16 (#$ . 4180)])
#@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\315\"\262\207" ["" reverse "," replace-regexp-in-string "\\(\\\\*\\)," #[257 "\300\301\302\303\"G_T\304\"\305P\207" [make-string 2 match-string 1 92 ","] 6 "\n\n(fn M)"] string-match "\\\\+\\'" match-string 0 nil t substring 1] 12 (#$ . 5752)])
#@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 "" ","] 6 "\n\n(fn STR)"] nil t ""] 8 (#$ . 6397)])
#@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\301!\203\3021\303\304\305\303#)0\202\306\307\"\262\210\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 (#$ . 6924)])
#@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\302!\203
\303!q\210\212\214~\210\211\206`b\210\304\305\306!\"\307\310\3112o\312\310\307#\203T\313 \314!\315=\203P\316\317\"\204I\320\311\"\210\202O\321Q\262\210\210\202&\211\205n\211\310\322\203c\323\202d\324\325\322\326\325##\266\2020)\266\203+\207" [case-fold-search 1 markerp marker-buffer format "^[ 	]*#\\+%s:" regexp-quote t nil :exit re-search-forward org-element-at-point org-element-type keyword org-element-property :value throw " " replace-regexp-in-string "\\`\\([ 	]*\n\\)+" "\\`[ 	\n
]+" "" "[ 	\n
]+\\'"] 15 (#$ . 7415)])
#@66 Find value for DATE in current buffer.
Return value as a string.
(defalias 'org-macro--find-date #[0 "\300\301!\302\303\304!\"\211:\203*\211A\204*\305@!\306=\203*\307\310\307\311\312@!\"#\202+\207" [org-macro--find-keyword-value "DATE" org-element-parse-secondary-string org-element-restriction keyword org-element-type timestamp format "(eval (if (org-string-nw-p $1) %s %S))" "(org-timestamp-format '%S $1)" org-element-copy] 8 (#$ . 8324)])
#@13 

(fn FILE)
(defalias 'org-macro--vc-modified-time #[257 "\301 \302\303\304\305\306!\307\"\310$\216\311!\205d\312\313!\314\315C\302\303\304\305\306!\316\"\310$\216\317\311!\320\315\211\321&\210rq\210\322\302\303\323\305\306!\324\"\325$!\210)\326!\211\203]\327\330\315\314$\204P\210)\211\242)\266\203)\207" [case-fold-search current-window-configuration make-byte-code 0 "\301\300!\207" vconcat vector [set-window-configuration] 2 vc-backend get-buffer-create " *org-vc*" t nil [kill-buffer] vc-call-backend print-log 1 vc-exec-after "eb\210\301\302\303\304#\205 \305`\306 {!\307\310\"\205\300\311\312\"\240\262\207" [re-search-forward "Date:?[ 	]*" nil t parse-time-string line-end-position cl-some identity apply encode-time] 5 get-buffer-process accept-process-output 0.5] 13 (#$ . 8783)])
#@47 Hash table containing counter value per name.
(defvar org-macro--counter-table nil (#$ . 9608))
#@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 (#$ . 9710)])
#@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 "\302\303\203\304\202\f\305\306\303\307\306##\266\202\310!\2052\302\303\203'\304\202(\305\306\303\307\306##\266\202\311\310!\204C\312\313#T\202h\314\230\203Q\312\315#\202h\316\302\317\320#)\266\203\203g\321!\202h\315#\207" [org-macro--counter-table inhibit-changing-match-data nil replace-regexp-in-string "\\`\\([ 	]*\n\\)+" "\\`[ 	\n
]+" "" "[ 	\n
]+\\'" org-string-nw-p puthash gethash 0 "-" 1 "\\`[0-9]+\\'" t string-match string-to-number] 13 (#$ . 9898)])
(provide 'org-macro)

Zerion Mini Shell 1.0