Explorar o código

ob-sh: adding check of existence for session variable

Eric Schulte %!s(int64=15) %!d(string=hai) anos
pai
achega
e853f11899
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      lisp/babel/langs/ob-sh.el

+ 1 - 1
lisp/babel/langs/ob-sh.el

@@ -131,7 +131,7 @@ Emacs-lisp table, otherwise return the results as a string."
 
 (defun org-babel-sh-initiate-session (&optional session params)
   "Initiate a session named SESSION according to PARAMS."
-  (unless (string= session "none")
+  (when (and session (not (string= session "none")))
     (save-window-excursion
       (or (org-babel-comint-buffer-livep session)
           (progn (shell session) (get-buffer (current-buffer)))))))