> Ihor Radchenko writes on Thu 26 Oct 2023 08:44:
>  > I currently do not have a setup to test ssh commands,
> Sorry if that's irrelevant: I realized that one can ssh to the *same*
> machine.

You are indeed right.
I can now reproduce the problem locally.

It boils down to

(setq exit-status
          (process-file shell-file-name input-file
                        (if error-file
                            (list t error-file)
                        nil shell-command-switch command))

that is an equivalent of

bash -c bash /path/to/

----- ----
 ssh localhost 'echo foo>/tmp/foo_file'
  echo $(uname -a) |tee /tmp/uname1.txt

If one tries to evaluate the above, the second line is not produced. It
has nothing to do with Emacs itself.

However, if I try

(process-file "bash" "/tmp/"), the /tmp/uname1.txt is not

This time, it is Emacs problem.
The problem is caused by interactive password prompt displayed by ssh.

I guess we may try to report this upstream, though I am not sure if this
is something that is supported to start with.

>From Org perspective, it is not the first time when interactive shell
programs are causing problems. I'd say that we have no technical ability
to support them reliably and one has to use ob-screen or similar
libraries to properly interact with such code blocks.

Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <>.
Support Org development at <>,
or support my work at <>

Reply via email to