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)))))
Ken Mankoff writes:
> 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.
Sounds reasonable to me. Could add a commit message and NEWS entry to
the patch?
Kyle Meyer writes: > Ken Mankoff writes: > >> 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. > > Sounds reasonable to me. Could add a commit message and NEWS entry to :/ ^ you > the patch?
Kyle Meyer writes: > Kyle Meyer writes: > >> Ken Mankoff writes: >> >>> 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. >> >> Sounds reasonable to me. Could add a commit message and NEWS entry to > :/ ^ you >> the patch? For posterity: This patch was included in a set of patches at <https://orgmode.org/list/87h7u93j8b.fsf@gmail.com>.