;ELC ;;; Compiled ;;; in Emacs version 26.3 ;;; 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!\210\300\304!\210\305\306\307\310\311DD\312\313\314\315\316\317\320& \210\305\321\307\310\322DD\323\313\314\317\324&\210\305\325\307\310\326DD\327\313\330\315\316\317\331& \210\305\332\307\310\333DD\334\313\330\315\316\317\331& \210\305\335\307\310\336DD\337\313\330\315\316\317\331& \210\305\340\307\310\341DD\342\313\330\315\316\317\343& \210\305\344\307\310\345DD\342\313\330\315\316\317\343& \210\305\346\307\310\347DD\350\313\330\317\324&\210\305\351\307\310\352DD\353\313\330\315\316\317\310& \207" [require cl-lib org-src org-macs ol custom-declare-variable org-babel-tangle-lang-exts funcall function #[0 "\300\207" [(("emacs-lisp" . "el") ("elisp" . "el"))] 1] "Alist mapping languages to their file extensions.\nThe key is the language name, the value is the string that should\nbe inserted as the extension commonly used to identify files\nwritten in this language. If no entry is found in this list,\nthen the name of the language is used." :group org-babel-tangle :version "24.1" :type (repeat (cons (string "Language name") (string "File Extension"))) org-babel-tangle-use-relative-file-links #[0 "\300\207" [t] 1] "Use relative path names in links from tangled source back the Org file." boolean org-babel-post-tangle-hook #[0 "\300\207" [nil] 1] "Hook run in code files tangled by `org-babel-tangle'." org-babel hook org-babel-pre-tangle-hook #[0 "\300\207" [(save-buffer)] 1] "Hook run at the beginning of `org-babel-tangle'." org-babel-tangle-body-hook #[0 "\300\207" [nil] 1] "Hook run over the contents of each code block body." org-babel-tangle-comment-format-beg #[0 "\300\207" [#1="[[%link][%source-name]]"] 1 #1#] "Format of inserted comments in tangled code files.\nThe following format strings can be used to insert special\ninformation into the output using `org-fill-template'.\n%start-line --- the line number at the start of the code block\n%file --------- the file from which the code block was tangled\n%link --------- Org style link to the code block\n%source-name -- name of the code block\n\nUpon insertion the formatted comment will be commented out, and\nfollowed by a newline. To inhibit this post-insertion processing\nset the `org-babel-tangle-uncomment-comments' variable to a\nnon-nil value.\n\nWhether or not comments are inserted during tangling is\ncontrolled by the :comments header argument." string org-babel-tangle-comment-format-end #[0 "\300\207" [#2="%source-name ends here"] 1 #2#] org-babel-tangle-uncomment-comments #[0 "\300\207" [nil] 1] "Inhibits automatic commenting and addition of trailing newline\nof tangle comments. Use `org-babel-tangle-comment-format-beg'\nand `org-babel-tangle-comment-format-end' to customize the format\nof tangled comments." org-babel-process-comment-text #[0 "\300\207" [org-remove-indentation] 1] "Function called to process raw Org text collected to be\ninserted as comments in tangled source-code files. The function\nshould take a single string argument and return a string\nresult. The default value is `org-remove-indentation'."] 10) #@92 Find file ensuring that the latest changes on disk are represented in the file. (fn FILE) (defalias 'org-babel-find-file-noselect-refresh #[257 "\300\301\"\210r\302!q\210\303\304\211\211#)\207" [find-file-noselect nowarn get-file-buffer revert-buffer t] 5 (#$ . 3490)]) #@157 Open FILE into a temporary buffer execute BODY there like `progn', then kill the FILE buffer returning the result of evaluating BODY. (fn FILE &rest BODY) (defalias 'org-babel-with-temp-filebuffer '(macro . #[385 "\300\301!\300\302!\300\303!\300\304!\305D\306DDF\307D\310\306 DE\311\310 \312 BEE\313\314 DE\257\207" [make-symbol "temp-path" "temp-result" "temp-file" "visited-p" let* get-file-buffer org-babel-find-file-noselect-refresh setf with-current-buffer progn unless kill-buffer] 16 (#$ . 3770)])) (byte-code "\300\301\302\303#\304\301\305\306#\207" [function-put org-babel-with-temp-filebuffer lisp-indent-function 1 put edebug-form-spec (form body)] 5) #@423 Extract the bodies of source code blocks in FILE. Source code blocks are extracted with `org-babel-tangle'. Optional argument TARGET-FILE can be used to specify a default export file for all source blocks. Optional argument LANG-RE can be used to limit the exported source code blocks by languages matching a regular expression. Return a list whose CAR is the tangled file name. (fn FILE &optional TARGET-FILE LANG-RE) (defalias 'org-babel-tangle-file #[769 "\300\301!!\302\303 \304\305\306\307\310!\311\"\312$\216\313!\210p\262\314\301\315\302#\")\262\2041\316!\210\207" [find-buffer-visiting expand-file-name nil current-window-configuration make-byte-code 0 "\301\300!\207" vconcat vector [set-window-configuration] 2 find-file mapcar org-babel-tangle kill-buffer] 12 (#$ . 4463) "fFile to tangle: \nP"]) #@76 Tangle FILENAME and place the results in PUB-DIR. (fn _ FILENAME PUB-DIR) (defalias 'org-babel-tangle-publish #[771 "\211C\300\242!\204\301\242\302\"\210\211\303\242!\240\210\304\305\306\307\310\311!\312\"\313\314%\315!\"\207" [file-exists-p make-directory t file-name-as-directory mapc make-byte-code 257 "\301\300\242\302#\207" vconcat vector [copy-file t] 5 "\n\n(fn EL)" org-babel-tangle-file] 11 (#$ . 5293)]) #@579 Write code blocks to source-specific files. Extract the bodies of all source code blocks from the current file into their own source-specific files. With one universal prefix argument, only tangle the block at point. When two universal prefix arguments, only tangle blocks for the tangle file of the block at point. Optional argument TARGET-FILE can be used to specify a default export file for all source blocks. Optional argument LANG-RE can be used to limit the exported source code blocks by languages matching a regular expression. (fn &optional ARG TARGET-FILE LANG-RE) (defalias 'org-babel-tangle #[768 "\302\303!\210\214\212\304\232\203\305 \211\203\211b\210\202\306\307!\210\210\310C\203-\311\312BC\"\202.\313\232\205B\312\314\315\316!8\236A\206B\306\307!\317C\320\321\322\323\324\325 \"\326\"\327\330%\331\232\203d\332\333\334\"\202i\335\"\"\210\336\337\242\242\333U\203{\340\202|\341\342\343\344 \206\204p!!$\210 \203\225\320\345\346\347\242\"\"\210\320\350\242\"\210\346\347\242\")\266\204*\207" [org-babel-default-header-args org-babel-post-tangle-hook run-hooks org-babel-pre-tangle-hook (4) org-babel-where-is-src-block-head user-error "Point is not in a source code block" 0 org-babel-merge-params :tangle (16) 2 org-babel-get-src-block-info light nil mapc make-byte-code 257 "\211@A\303\n\"A\206 \304!\305C\306\307\310\311\312\313\300\301\n\n\n%\314\"\315\316%\"\207" vconcat vector [org-babel-tangle-lang-exts assoc org-src-get-lang-mode nil mapc make-byte-code 257 "\305\211\306\"\307\"\211G\310V\205\211\262\311\"\312\230\203%\313A@!\2027\314\230\203/\315\2027G\310V\2057\211\205M\302\203L\312\230\203L\211\316\302Q\202M\211\211\205.\317\"\320!\203l\211\203l\314\230\204l\321\322\"\210\266\323!\203\202\211\324\325\301\242\"\235\204\202\326!\210\327\330!r\211q\210\331\310\332\333\334!\335\"\336$\216\337\303!\203\252\3401\245\303 0\202\251\210\202\252\210\203\301\304\242\235\204\301\341Pc\210\304\304\242B\240\210\342!\210\343 \327\330!r\211q\210\331\310\332\333\334!\344\"\336$\216\323!\203\345\345!\210db\210\346\347 8\236A\314\230\204\375`eU\204\375\341c\210c\210\350\315\211#\210*\266*\210\203\204\351\262\300\211\242T\240\210\352\301\242\"?\205.\301B\301\242B\240\266\205\207" vconcat vector [#[514 "\300\3018\"A\207" [assoc 4] 6 "\n\n(fn SPEC NAME)"] :tangle :shebang 0 :tangle-mode "yes" file-name-sans-extension "no" nil "." :mkdirp file-name-directory make-directory parents file-exists-p mapcar car delete-file generate-new-buffer " *temp*" make-byte-code "\301\300!\205 \302\300!\207" vconcat vector [buffer-name kill-buffer] 2 fboundp (error) "\n" org-babel-spec-to-string buffer-string [buffer-name kill-buffer] insert-file-contents :padline 4 write-region 493 assoc] 16 "\n\n(fn SPEC)"] 17 "\n\n(fn BY-LANG)" (4) org-babel-tangle-single-block 1 t org-babel-tangle-collect-blocks message "Tangled %d code block%s from %s" "" "s" file-name-nondirectory buffer-file-name buffer-base-buffer #[257 "\211\300!\301\211\302!\210\300!\262r\211q\210\303\304!\262)\204!\305!\210\207" [get-file-buffer nil org-babel-find-file-noselect-refresh run-hooks org-babel-post-tangle-hook kill-buffer] 7 "\n\n(fn FILE)"] mapcar car #[257 "\211A\205 \300@A\"\207" [set-file-modes] 4 "\n\n(fn PAIR)"]] 15 (#$ . 5725) "P"]) #@312 Remove comments inserted by `org-babel-tangle'. Call this function inside of a source-code file generated by `org-babel-tangle' to remove all comments inserted automatically by `org-babel-tangle'. Warning, this comment removes any lines containing constructs which resemble Org file links or noweb references. (defalias 'org-babel-tangle-clean #[0 "eb\210\300\301\302\303#\204\300\304 \302\303#\205)\212\305\306!\210`)\212\306\210\306u\210`)|\210\202\207" [re-search-forward "\\[\\[file:.*\\]\\[.*\\]\\]" nil t org-babel-noweb-wrap beginning-of-line 1] 4 (#$ . 9106) nil]) #@293 Insert SPEC into the current file. Insert the source-code specified by SPEC into the current source code file. This function uses `comment-region' which assumes that the appropriate major-mode is set. SPEC has the form: (start-line file link source-name params body comment) (fn SPEC) (defalias 'org-babel-spec-to-string #[257 "\211@A\211@A\211@A\211@A\211@A\211@A\211@A\n \302\236A\211\303\230\206A\211\304\230\206A\211\305\230\206A\211\306\230\307\310!B\311B\304B\312 BF\313\n\203^\211\f\"\210\203j\211\314\"\"\210 \315\261\210\205{\211\314 \"\"\266\204\266\207\207" [org-babel-tangle-comment-format-beg org-babel-tangle-comment-format-end :comments "both" "link" "yes" "noweb" "start-line" number-to-string "file" "source-name" #[514 "\205@\302\230?\205@\303!\205@\203\211c\207\304`\305\211\203+\306\307G $\210\2023\310\307G\305$\210\266\202c\210`\"\210\305\210\311c\207" [org-babel-tangle-uncomment-comments org-rm-props "no" org-string-nw-p comment-region nil remove-text-properties 0 set-text-properties "\n"] 11 "\n\n(fn COMMENTS TEXT)"] org-fill-template "\n"] 31 (#$ . 9693)]) #@432 Collect source blocks in the current Org file. Return an association list of source-code block specifications of the form used by `org-babel-spec-to-string' grouped by language. Optional argument LANG-RE can be used to limit the collected source code blocks by languages matching a regular expression. Optional argument TANGLE-FILE can be used to limit the collected code blocks by target file. (fn &optional LANG-RE TANGLE-FILE) (defalias 'org-babel-tangle-collect-blocks #[512 "\306\307\211\310\311 \211?\206\312\313!!`\307\314 \315\306\316\317\320!\321\"\322$\216\203)\323!\210p\262eb\210\324 \307\310#\203\366\325 \203/\306\224b\210\326\306!\306\224\306\225\326\322!\322\224\322\225\326\327!\327\224\327\225\326\330!\330\224\330\225\326\331!\331\224\331\225\212\214~\210\310\332 \211\333 P\334 .=\203\205T\262\202\213\335\262\211\262\210\336 \204\356\337 \204\356\340\341!\211@\342\3228\236A\211\343\230\204\354\203\263\232\203\354\203\312\307\310*\344#)\266\203\203\354\345\"\346!\203\341AB\241\210\202\352CBB\262\266\266\fb\266\202/)\210\204\347!\210b\210)\266\350\351\237\"\207" [case-fold-search org-babel-src-block-regexp org-called-with-limited-levels org-outline-regexp outline-regexp org-outline-regexp-bol 0 nil t buffer-file-name get-file-buffer expand-file-name current-window-configuration make-byte-code "\301\300!\207" vconcat vector [set-window-configuration] 2 find-file re-search-forward org-babel-active-location-p match-string 3 4 5 org-get-limited-outline-regexp "^" outline-previous-heading 1 org-in-commented-heading-p org-in-archived-heading-p org-babel-get-src-block-info light :tangle "no" string-match assoc org-babel-tangle-single-block kill-buffer mapcar #[257 "\211@A\237B\207" [] 3 "\n\n(fn B)"] inhibit-changing-match-data] 36 (#$ . 10852)]) #@284 Collect the tangled source for current block. Return the list of block attributes needed by `org-babel-tangle-collect-blocks'. When ONLY-THIS-BLOCK is non-nil, return the full association list to be used by `org-babel-tangle' directly. (fn BLOCK-COUNTER &optional ONLY-THIS-BLOCK) (defalias 'org-babel-tangle-single-block #[513 "\306 \214~\210\307`!T)\310\311 !@\3128\3138\3148\315!\316\317!\317\211\2030\320\321G$\210\2028\322\321G\317$\210\266\202\323 \"\205F\324\325\"\262\326 8\206h\327\330\3311]\326\332 80\202a\210\202d\206e\333 #\334\335P!\334\336 P!\337\340\"\203\203\341\f!\202\207 A@\342\343!r\211q\210\344\321\345\346\347!\350\"\312$\216\351\n\236\203\245\202\303\352!\203\263 \"\202\303\353 \352!\205\302 !#c\210\323\354\n\"\203\340eb\210\355\317\356#\203\340\357\360!\210\202\320\361\362!\210\363 *\262\262\364 \236A\365\230\204\377\364 \236A\366\230\205&\n\3671\212\370\356!\210\321\225)0\202\210e\212\371 \317\356#\203 \321\225\202!e)]`{!\f\f\2033\372 !\2025\f\f\203_\323  \"\203_\324\325 \"\373\230\203_\374\372 \321\225\317O\375\340\236A!\"P\202a @\203\210\356\376\203v\377\202y\201A\360\376\201B\360##\266\202\202\247\201C!\317\376\203\230\377\202\233\201A\360\376\201B\360##\266\202\257\203\271 CBC\202\272\211\207" [org-rm-props org-link-bracket-re org-babel-process-comment-text org-babel-src-block-regexp org-babel-tangle-use-relative-file-links org-link-types-re org-babel-get-src-block-info line-number-at-pos buffer-file-name buffer-base-buffer 2 3 6 org-src-coderef-regexp org-store-link nil remove-text-properties 0 set-text-properties string-match match-string 1 4 format "%s:%d" (error) org-heading-components "No heading" intern "org-babel-expand-body:" "org-babel-variable-assignments:" org-babel-noweb-p :tangle org-babel-expand-noweb-references generate-new-buffer " *temp*" make-byte-code "\301\300!\205 \302\300!\207" vconcat vector [buffer-name kill-buffer] :no-expand fboundp org-babel-expand-body:generic "-r" re-search-forward t replace-match "" run-hooks org-babel-tangle-body-hook buffer-string :comments "both" "org" (error) org-back-to-heading re-search-backward file-relative-name "file" "file:" file-name-directory replace-regexp-in-string "\\`\\([ ]*\n\\)+" org-src-preserve-indentation "\\`[ \n ]+" "[ \n ]+\\'" org-remove-indentation] 30 (#$ . 12714)]) #@196 Return a list of begin and end link comments for the code block at point. INFO, when non nil, is the source block information, as returned by `org-babel-get-src-block-info'. (fn &optional INFO) (defalias 'org-babel-tangle-comment-links #[256 "\211\206\303\304!\211:\205\234\211A\211:\205\232\211A\211:\205\230\211A\211:\205\226\211A\211:\205\224\211@A\211:\205\222\211@A\211:\205\220\211A\211?\205\216\305\212\306!\203Q\307!q\210\212\214~\210\211\206Z`b\210\310\311 !+\262B\312\313 B\314\315\316!\316\211\203|\317\320G$\210\202\204\321\320G\316$\210\266\202B\322BF\266\202\262\266\202\266\202\262\262\262\262\262\323 \"\323\n\"D\207" [org-rm-props org-babel-tangle-comment-format-beg org-babel-tangle-comment-format-end org-babel-get-src-block-info light "start-line" markerp marker-buffer number-to-string line-number-at-pos "file" buffer-file-name "link" org-store-link nil remove-text-properties 0 set-text-properties "source-name" org-fill-template] 23 (#$ . 15148)]) #@208 Propagate changes in source file back original to Org file. This requires that code blocks were tangled with link comments which enable the original code blocks to be found. (fn &optional SOURCE-CODE-FILE) (defalias 'org-babel-detangle #[256 "\212\211\203 \301!\210eb\210\302\303\211\304\303\305#\203Q\306\307!\203H\304\310\311\306\307!!\312Q\303\305#\203H\302\225\262\313y\210\212\314 \211\262\203@\315!\210)T\262\202K`\262\211b\210\202\316\317\"\210\266\203)\207" [org-link-bracket-re find-file 0 nil re-search-forward t match-string 2 " " regexp-quote " ends here" -1 org-babel-tangle-jump-to-org org-babel-update-block-body message "Detangled %d code blocks"] 9 (#$ . 16165) nil]) #@61 Jump from a tangled code file to the related Org mode file. (defalias 'org-babel-tangle-jump-to-org #[0 "`\301\211\211\211\211\211\211\211\302 \303\304\305\306\307!\310\"\311$\216\212\312\301\313#\203j\314 \211\262\n\203\314\311!\211\262 \203\315\304!\211\262\203\315\311!\211\262\203\212\316 \303\304\317\306\307!\320\"\321$\216\322\323\324!\325Q\301\313#\210\314 \211\262 )\262)\203\203\nW\203 W\204\203\326\327!\210{\262)\330!\210p\262\331\332\"\203\322\333\315\334\"!\335 \203\252eb\210\202\256\336\313!\210\337 \204\274\340\341 !\342=\204\303\343!\210\202\316\211\334U\204\316\343S!\210\210\202\326\344!\210\345 b\210\334y\210 Z`\\V\203\356\211u\210\210`\262)\210\346\313\"\210b\210\207" [org-link-bracket-re nil current-window-configuration make-byte-code 0 "\301\300!\207" vconcat vector [set-window-configuration] 2 re-search-backward t line-beginning-position match-string match-data "\301\300\302\"\207" [set-match-data evaporate] 3 re-search-forward " " regexp-quote " ends here" error "Not in tangled code" org-link-open-from-string string-match "[^ \n ]:\\([[:digit:]]+\\)" string-to-number 1 org-before-first-heading-p org-back-to-heading org-at-heading-p org-element-type org-element-at-point src-block org-babel-next-src-block org-babel-goto-named-src-block org-babel-where-is-src-block-head org-src-switch-to-buffer] 17 (#$ . 16875) nil]) (provide 'ob-tangle)