all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* 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/)]
@ 2020-07-09 16:14 Ken Mankoff
  2020-07-14  5:01 ` Kyle Meyer
  0 siblings, 1 reply; 4+ messages in thread
From: Ken Mankoff @ 2020-07-09 16:14 UTC (permalink / raw)
  To: emacs-orgmode


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)))))


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: 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/)]
  2020-07-09 16:14 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/)] Ken Mankoff
@ 2020-07-14  5:01 ` Kyle Meyer
  2020-07-14  5:02   ` Kyle Meyer
  0 siblings, 1 reply; 4+ messages in thread
From: Kyle Meyer @ 2020-07-14  5:01 UTC (permalink / raw)
  To: Ken Mankoff; +Cc: emacs-orgmode

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?


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: 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/)]
  2020-07-14  5:01 ` Kyle Meyer
@ 2020-07-14  5:02   ` Kyle Meyer
  2020-07-15  3:09     ` Kyle Meyer
  0 siblings, 1 reply; 4+ messages in thread
From: Kyle Meyer @ 2020-07-14  5:02 UTC (permalink / raw)
  To: Ken Mankoff; +Cc: emacs-orgmode

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?


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: 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/)]
  2020-07-14  5:02   ` Kyle Meyer
@ 2020-07-15  3:09     ` Kyle Meyer
  0 siblings, 0 replies; 4+ messages in thread
From: Kyle Meyer @ 2020-07-15  3:09 UTC (permalink / raw)
  To: Ken Mankoff, emacs-orgmode

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>.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-07-15  3:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-07-09 16:14 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/)] Ken Mankoff
2020-07-14  5:01 ` Kyle Meyer
2020-07-14  5:02   ` Kyle Meyer
2020-07-15  3:09     ` Kyle Meyer

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.