On 19/03/2023 21:42, Ken Mankoff wrote:
Here is the other patch. Respect custom screen command.
Thanks, Ken.
+++ b/lisp/ob-screen.el
@@ -98,7 +98,7 @@ In case you want to use a different screen than one selected by
your $PATH")
(defun org-babel-screen-session-socketname (session)
"Check if SESSION exists by parsing output of \"screen -ls\"."
- (let* ((screen-ls (shell-command-to-string "screen -ls"))
+ (let* ((screen-ls (shell-command-to-string (concat org-babel-screen-location "
-ls")))
Currently `org-babel-screen-location' is used as an argument of
`start-process', so if the value contains spaces or other shell special
characters they are not interpreted by shell. Since there is no
convenience function like process-to-string that accepts command as list
instead of string with a shell command, it is better to pass screen
location through `shell-quote-argument'.
You may try to create a directory with a space in its name, create a
symlink from this directory to /usr/bin/srceen, and set
`org-babel-screen-location' to the full path (with space).