瀏覽代碼

babel: small wait on new ruby sessions to allow process to start

* contrib/babel/lisp/langs/org-babel-ruby.el (org-babel-ruby-initiate-session):
   Adding a small wait after stating a new ruby session.  This avoids
   errors with `ansi-color-process-output' not being able to find the
   process mark.
Eric Schulte 15 年之前
父節點
當前提交
6e34e75888
共有 1 個文件被更改,包括 3 次插入2 次删除
  1. 3 2
      contrib/babel/lisp/langs/org-babel-ruby.el

+ 3 - 2
contrib/babel/lisp/langs/org-babel-ruby.el

@@ -129,9 +129,10 @@ Emacs-lisp table, otherwise return the results as a string."
   "If there is not a current inferior-process-buffer in SESSION
 then create.  Return the initialized session."
   (unless (string= session "none")
-    (let ((session-buffer (save-window-excursion (run-ruby nil session) (current-buffer))))
+    (let ((session-buffer (save-window-excursion
+			    (run-ruby nil session) (current-buffer))))
       (if (org-babel-comint-buffer-livep session-buffer)
-          session-buffer
+	  (progn (sit-for .25) session-buffer)
         (sit-for .5)
         (org-babel-ruby-initiate-session session)))))