emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v4] lisp/ob-screen.el: Support ~:var~ header args for babel b


From: Max Nikulin
Subject: Re: [PATCH v4] lisp/ob-screen.el: Support ~:var~ header args for babel blocks
Date: Tue, 21 Mar 2023 21:12:53 +0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]