lisp/ob-R.el: use `ess-wait-for-process' to assure clean session startup

* lisp/ob-R.el (org-babel-R-initiate-session): Make sure that (R) has
finished before `rename-buffer' is run.

TINYCHANGE
This commit is contained in:
chasberry 2014-09-16 19:57:59 -07:00 committed by Aaron Ecay
parent 3432681fbe
commit 0fd29a5ee7
1 changed files with 3 additions and 0 deletions

View File

@ -35,6 +35,8 @@
(declare-function inferior-ess-send-input "ext:ess-inf" ())
(declare-function ess-make-buffer-current "ext:ess-inf" ())
(declare-function ess-eval-buffer "ext:ess-inf" (vis))
(declare-function ess-wait-for-process "ext:ess-inf"
(&optional proc sec-prompt wait force-redisplay))
(declare-function org-number-sequence "org-compat" (from &optional to inc))
(declare-function org-remove-if-not "org" (predicate seq))
(declare-function org-every "org" (pred seq))
@ -262,6 +264,7 @@ This function is called by `org-babel-execute-src-block'."
;; Session buffer exists, but with dead process
(set-buffer session))
(require 'ess) (R)
(ess-wait-for-process)
(rename-buffer
(if (bufferp session)
(buffer-name session)