emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

patch: ob-screen: don't change user-specified session name [9.3.7 (9.3.7


From: Ken Mankoff
Subject: patch: ob-screen: don't change user-specified session name [9.3.7 (9.3.7-12-g5d6868-elpaplus @ /home/kdm/.emacs.d/elpa/org-plus-contrib-20200706/)]
Date: Thu, 09 Jul 2020 09:14:27 -0700
User-agent: mu4e 1.4.3; emacs 26.3

ob-screen prepends "org-babel-session-" to the user-specific screen name for 
some reason. I suggest this is not necessary nor optimal. One of the key points 
of 'screen' is that you can detach and attach from elsewhere. The name of the 
session is an important part of this process, and changing the user-chosen name 
complicates this. I note that in the other babel :session names I use (shell, 
Python, jupyter-python, etc.) the :session name is not modified.

  -k.



diff --git a/lisp/ob-screen.el b/lisp/ob-screen.el
index 75a2dc691..685961a7e 100644
--- a/lisp/ob-screen.el
+++ b/lisp/ob-screen.el
@@ -62,8 +62,7 @@ In case you want to use a different screen than one selected 
by your $PATH")
          (process-name (concat "org-babel: terminal (" session ")")))
     (apply 'start-process process-name "*Messages*"
            terminal `("-T" ,(concat "org-babel: " session) "-e" 
,org-babel-screen-location
-                     "-c" "/dev/null" "-mS" ,(concat "org-babel-session-" 
session)
-                     ,cmd))
+                     "-c" "/dev/null" "-mS" ,session ,cmd))
     ;; XXX: Is there a better way than the following?
     (while (not (org-babel-screen-session-socketname session))
       ;; wait until screen session is available before returning
@@ -97,8 +96,7 @@ In case you want to use a different screen than one selected 
by your $PATH")
                         nil
                         (mapcar
                          (lambda (x)
-                           (when (string-match
-                                  (concat "org-babel-session-" session) x)
+                           (when (string-match session x)
                              x))
                          sockets)))))
     (when match-socket (car (split-string match-socket)))))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]