Function: org-babel-comint-wait-for-output

org-babel-comint-wait-for-output is a byte-compiled function defined in ob-comint.el.gz.

Signature

(org-babel-comint-wait-for-output BUFFER)

Documentation

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).

Source Code

;; Defined in /usr/src/emacs/lisp/org/ob-comint.el.gz
(defun org-babel-comint-wait-for-output (buffer)
  "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)."
  (org-babel-comint-in-buffer buffer
    (while (progn
             (goto-char comint-last-input-end)
             (not (and (re-search-forward comint-prompt-regexp nil t)
                     (goto-char (match-beginning 0)))))
      (accept-process-output (get-buffer-process buffer)))))