;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!\207" [require ob-core org-compat comint] 2) #@70 Check if BUFFER is a comint buffer with a live process. (fn BUFFER) (defalias 'org-babel-comint-buffer-livep #[257 "\211\205\300!\211\205\301!\205\302!\205\211\207" [get-buffer buffer-live-p get-buffer-process] 4 (#$ . 500)]) #@195 Check BUFFER and execute BODY. BUFFER is checked with `org-babel-comint-buffer-livep'. BODY is executed inside the protection of `save-excursion' and `save-match-data'. (fn BUFFER &rest BODY) (defalias 'org-babel-comint-in-buffer '(macro . #[385 "\300\301\302D\303\304EE\305\306\307\310\311BBDEDE\207" [progn unless org-babel-comint-buffer-livep error "Buffer %s does not exist or has no process" save-match-data with-current-buffer save-excursion let ((comint-input-filter (lambda (_input) nil)))] 11 (#$ . 745)])) (byte-code "\300\301\302\303#\304\301\305\306#\207" [function-put org-babel-comint-in-buffer lisp-indent-function 1 put edebug-form-spec (form body)] 5) #@517 Evaluate BODY in BUFFER and return process output. Will wait until EOE-INDICATOR appears in the output, then return all process output. If REMOVE-ECHO and FULL-BODY are present and non-nil, then strip echo'd body from the returned output. META should be a list containing the following where the last two elements are optional. (BUFFER EOE-INDICATOR REMOVE-ECHO FULL-BODY) This macro ensures that the filter is removed in case of an error or user `keyboard-quit' during execution of body. (fn META &rest BODY) (defalias 'org-babel-comint-with-output '(macro . #[385 "@A@\3008\3018\302\303\304\305\306\307 \310\311\312\313\314\315\316\317D\320BB\321BBDDE\322BB\323\324\325\315\326\327\330\331\317\332\333BBDF\334BBF\335BB\336BBBB\"BBBBE\207" [2 3 org-babel-comint-in-buffer let* ((string-buffer #1="") (comint-output-filter-functions (cons (lambda (text) (setq string-buffer (concat string-buffer text))) comint-output-filter-functions)) dangling-text) (goto-char (process-mark (get-buffer-process (current-buffer)))) (let ((start (point)) (end (point-max))) (setq dangling-text (buffer-substring start end)) (delete-region start end)) append while progn (goto-char comint-last-input-end) not save-excursion and re-search-forward regexp-quote (nil t) ((re-search-forward comint-prompt-regexp nil t)) ((accept-process-output (get-buffer-process (current-buffer)))) (goto-char (process-mark (get-buffer-process (current-buffer)))) (insert dangling-text) when string-match replace-regexp-in-string "\n" "[ \n]+" or (#1#) (string-buffer) ((setq string-buffer (substring string-buffer (match-end 0)))) ((split-string string-buffer comint-prompt-regexp))] 29 (#$ . 1429)])) (byte-code "\300\301\302\303#\304\301\305\306#\207" [function-put org-babel-comint-with-output lisp-indent-function 1 put edebug-form-spec (sexp body)] 5) #@68 Pass CMD to BUFFER. The input will not be echoed. (fn BUFFER CMD) (defalias 'org-babel-comint-input-command #[514 "\301!\204 \302\303\"\210\304 \305\306\307\310\311!\312\"\313$\216rq\210\212\314\315\316!!b\210c\210\317 \210\320!,\207" [comint-input-filter org-babel-comint-buffer-livep error "Buffer %s does not exist or has no process" match-data make-byte-code 0 "\301\300\302\"\207" vconcat vector [set-match-data evaporate] 3 #[257 "\300\207" [nil] 2 "\n\n(fn INPUT)"] process-mark get-buffer-process comint-send-input org-babel-comint-wait-for-output] 9 (#$ . 3277)]) #@155 Wait until output arrives from BUFFER. Note: this is only safe when waiting for the result of a single statement (not large blocks of code). (fn BUFFER) (defalias 'org-babel-comint-wait-for-output #[257 "\303!\204 \304\305\"\210\306 \307\310\311\312\313!\314\"\315$\216rq\210\212\316 b\210\317\n\320\321#\2057\310\224b\2057\322\323 !\324\230?\205D\325\326!!\210\202 ,\207" [comint-input-filter comint-last-input-end comint-prompt-regexp org-babel-comint-buffer-livep error "Buffer %s does not exist or has no process" match-data make-byte-code 0 "\301\300\302\"\207" vconcat vector [set-match-data evaporate] 3 #[257 "\300\207" [nil] 2 "\n\n(fn INPUT)"] re-search-forward nil t face-name face-at-point "comint-highlight-prompt" accept-process-output get-buffer-process] 8 (#$ . 3867)]) #@179 Evaluate STRING in BUFFER invisibly. Don't return until FILE exists. Code in STRING must ensure that FILE exists at end of evaluation. (fn BUFFER FILE STRING &optional PERIOD) (defalias 'org-babel-comint-eval-invisibly-and-wait-for-file #[1027 "\300!\204 \301\302\"\210\303!\203\304!\210\305\306!\211GSH\307U\203'\202*\310P\"\210\303!?\205>\311\2069\312!\210\202,\207" [org-babel-comint-buffer-livep error "Buffer %s does not exist or has no process" file-exists-p delete-file process-send-string get-buffer-process 10 "\n" sit-for 0.25] 8 (#$ . 4672)]) (provide 'ob-comint)