On 21/07/2025 21:19, Ken Mankoff wrote:
Following up from 2023...

Perhaps procedure of restoring the context has not completed yet, but...

#+BEGIN_SRC emacs-lisp
(setq org-babel-screen-location "/home/kdm/tmp/dir with space/screen")
#+END_SRC

#+BEGIN_SRC screen
ls
#+END_SRC

Maybe because of original version of `org-babel-screen-session-socketname' ignores this variable.

On 2023-03-21 at 10:12 -04, Max Nikulin wrote
As to `org-babel-screen-test' perhaps the issue is additional newline
added after random number. I have not tried stepping through the
function in debugger though.

It was not the newline. Adding string-trim to:

     (setq tmp-string (string-trim (with-temp-buffer
                        (insert-file-contents-literally tmpfile)
                        (buffer-substring (point-min) (point-max)))))


Still fails. Weirdly, the fix is (sleep-for 0.1) in the test. But not in this 
loop:

Another idea is to wait completion of the Emacs process started by `start-process'.

@@ -83,14 +84,14 @@ org-babel-screen-session-execute-string
     (when socket
       (let ((tmpfile (org-babel-screen-session-write-temp-file session body)))
         (apply 'start-process (concat "org-babel: screen (" session ")") 
"*Messages*"
-               org-babel-screen-location
+               (shell-quote-argument org-babel-screen-location)

`start-process' does not use shell, so escaping should break it.

Reply via email to