>From e6ee8bff913da35a0183f8e2c1db7021342492d9 Mon Sep 17 00:00:00 2001 From: "Kenneth D. Mankoff" Date: Tue, 14 Jul 2020 13:41:35 -0700 Subject: [PATCH 2/3] ob-screen: Respect :session name. Don't prepend 'org-babel-session-' --- etc/ORG-NEWS | 7 +++++++ lisp/ob-screen.el | 6 ++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS index c366f61e0..623fa9dc3 100644 --- a/etc/ORG-NEWS +++ b/etc/ORG-NEWS @@ -380,6 +380,13 @@ From ~org-enable-priority-commands~ to ~org-priority-enable-commands~. From ~org-show-priority~ to ~org-priority-show~. ** Miscellaneous +*** =ob-screen.el=: Respect screen =:session= name + +Screen babel session are now named based on the =:session= header +argument (defaults to ~default~). + +Previously all session names had ~org-babel-session-~ prepended. + *** Forward/backward paragraph functions in line with the rest of Emacs ~org-forward-paragraph~ and ~org-backward-paragraph~, bound to ~~ and ~~ functions mimic more closely behaviour of diff --git a/lisp/ob-screen.el b/lisp/ob-screen.el index 3edc2c265..fe4698203 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 x) x)) sockets))))) (when match-socket (car (split-string match-socket))))) -- 2.25.1