diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS index c366f61e0..faf90f7a0 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..8ceadd238 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)))))