correctly using the ARTIFICIAL flag with comint-send-input

This commit is contained in:
Eric Schulte 2009-06-14 10:21:14 -07:00
parent 3cd99d0c2f
commit ba2756447d
3 changed files with 4 additions and 3 deletions

View File

@ -115,7 +115,7 @@ last statement in BODY."
(list body org-babel-python-last-value-eval org-babel-python-eoe-indicator) "\n")) (list body org-babel-python-last-value-eval org-babel-python-eoe-indicator) "\n"))
(raw (org-babel-comint-with-output buffer org-babel-python-eoe-indicator t (raw (org-babel-comint-with-output buffer org-babel-python-eoe-indicator t
;; for some reason python is fussy, and likes enters after every input ;; for some reason python is fussy, and likes enters after every input
(mapc (lambda (statement) (insert statement) (comint-send-input)) (mapc (lambda (statement) (insert statement) (comint-send-input nil t))
(split-string full-body "[\r\n]+")))) (split-string full-body "[\r\n]+"))))
(results (delete org-babel-python-eoe-indicator (results (delete org-babel-python-eoe-indicator
(cdr (member org-babel-python-eoe-indicator (cdr (member org-babel-python-eoe-indicator

View File

@ -104,7 +104,7 @@ last statement in BODY."
(let* ((full-body (mapconcat #'org-babel-chomp (let* ((full-body (mapconcat #'org-babel-chomp
(list body org-babel-ruby-last-value-eval org-babel-ruby-eoe-indicator) "\n")) (list body org-babel-ruby-last-value-eval org-babel-ruby-eoe-indicator) "\n"))
(raw (org-babel-comint-with-output buffer org-babel-ruby-eoe-indicator t (raw (org-babel-comint-with-output buffer org-babel-ruby-eoe-indicator t
(insert full-body) (comint-send-input))) (insert full-body) (comint-send-input nil t)))
(results (cdr (member org-babel-ruby-eoe-indicator (results (cdr (member org-babel-ruby-eoe-indicator
(reverse (mapcar #'org-babel-ruby-read-string (reverse (mapcar #'org-babel-ruby-read-string
(mapcar #'org-babel-trim raw))))))) (mapcar #'org-babel-trim raw)))))))

View File

@ -95,6 +95,7 @@ then create. Return the initialized session."
(let* ((session (if session (intern session) :default)) (let* ((session (if session (intern session) :default))
(shell-buffer (org-babel-shell-session-buffer session)) (shell-buffer (org-babel-shell-session-buffer session))
(newp (not (org-babel-comint-buffer-livep shell-buffer)))) (newp (not (org-babel-comint-buffer-livep shell-buffer))))
(message "initiating shell buffer %S" shell-buffer)
(shell shell-buffer) (shell shell-buffer)
(when newp (when newp
(setq shell-buffer (current-buffer)) (setq shell-buffer (current-buffer))
@ -115,7 +116,7 @@ last statement in BODY."
(let* ((full-body (mapconcat #'org-babel-chomp (let* ((full-body (mapconcat #'org-babel-chomp
(list body org-babel-shell-eoe-indicator) "\n")) (list body org-babel-shell-eoe-indicator) "\n"))
(raw (org-babel-comint-with-output buffer org-babel-shell-eoe-output nil (raw (org-babel-comint-with-output buffer org-babel-shell-eoe-output nil
(insert full-body) (comint-send-input))) (insert full-body) (comint-send-input nil t)))
(results (cdr (member org-babel-shell-eoe-output (results (cdr (member org-babel-shell-eoe-output
(reverse (mapcar #'org-babel-shell-strip-weird-long-prompt (reverse (mapcar #'org-babel-shell-strip-weird-long-prompt
(mapcar #'org-babel-trim raw))))))) (mapcar #'org-babel-trim raw)))))))