Function: org-babel-comint-in-buffer

org-babel-comint-in-buffer is a macro defined in ob-comint.el.gz.

Signature

(org-babel-comint-in-buffer BUFFER &rest BODY)

Documentation

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.

Source Code

;; Defined in /usr/src/emacs/lisp/org/ob-comint.el.gz
(defmacro org-babel-comint-in-buffer (buffer &rest body)
  "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'."
  (declare (indent 1) (debug t))
  `(progn
     (unless (org-babel-comint-buffer-livep ,buffer)
       (error "Buffer %s does not exist or has no process" ,buffer))
     (save-match-data
       (with-current-buffer ,buffer
	 (save-excursion
	   (let ((comint-input-filter (lambda (_input) nil)))
	     ,@body))))))