From d49084b73d754bc392be7db081c84f998270b2a4 Mon Sep 17 00:00:00 2001 From: Eric Schulte Date: Fri, 29 May 2009 17:45:40 -0700 Subject: [PATCH] small additions to org-babel-comint.el --- lisp/org-babel-comint.el | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/lisp/org-babel-comint.el b/lisp/org-babel-comint.el index 2cf301aab..37e4511f6 100644 --- a/lisp/org-babel-comint.el +++ b/lisp/org-babel-comint.el @@ -33,17 +33,18 @@ (require 'org-babel) (defun org-babel-comint-initiate-buffer (buffer ignite) - "If BUFFER does not currently have a process use IGNITE to -create one." - (unless (and (buffer-live-p buffer) (get-buffer buffer)) + "If BUFFER does not exist and currently have a process call +IGNITE from within BUFFER." + (unless (and (buffer-live-p buffer) (get-buffer buffer) (get-buffer-process buffer)) (save-excursion - (eval ignite) + (get-buffer-create buffer) + (funcall ignite) (setf buffer (current-buffer)) (org-babel-comint-wait-for-output) (org-babel-comint-input-command "")))) (defun org-babel-comint-command-to-string (buffer command) - "Send COMMEND to BUFFER's process, and return the results as a string." + "Send COMMAND to BUFFER's process, and return the results as a string." (org-babel-comint-input-command buffer command) (org-babel-comint-last-output buffer))