all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Jim Porter <jporterbugs@gmail.com>
To: Michael Albinus <michael.albinus@gmx.de>,
	Jordan Wilson <jordan.t.wilson@gmx.com>
Cc: 65551@debbugs.gnu.org
Subject: bug#65551: 29.1; Eshell on MS-Windows using plink: 'plink' is not recognized as an internal or external command...
Date: Sun, 27 Aug 2023 11:48:36 -0700	[thread overview]
Message-ID: <3792bc23-2bad-8262-c674-26cec9d47b65@gmail.com> (raw)
In-Reply-To: <87sf84s7bf.fsf@gmx.de>

On 8/27/2023 10:50 AM, Michael Albinus wrote:
> First I try to understand the scenario Eshell is using. If Eshell has
> changed to a remote directory, and a command like "./test.sh" is called,
> I would expect a synchronous process. But this doesn't seem to be the case:
> 
>>    tramp-file-name-handler(make-process :name "test.sh" :buffer #<killed buffer> :command ("/home/username/test.sh") :filter eshell-output-filter :sentinel eshell-sentinel :connection-type nil :stderr nil :file-handler t)
>>    eshell-gather-process-output("/plink:username@example.com:/home/username/test.s..." nil)
>>    eshell-external-command("./test.sh" nil)
> 
> `make-process' is called, an asynchronous process. Is this intended? Has
> this been changed since Emacs 28?

Yeah, that's intended. A couple of things did change in Emacs 29, but 
Eshell has always used an asynchronous process here. The goal is for the 
process to be only partially synchronous: Eshell will wait until the 
process is done before proceeding (e.g. to emit the next prompt), but it 
also wants to be async so that you can do other things in Emacs while 
waiting for the process to complete.

> Second, I've played a little bit on MS Windows. I haven't installed
> Emacs 29 there, just an Emacs git master checkout. And plink is not in
> the PATH of my MINGW64 bash shell, so I'm using sshx. But everything
> works under this constellation:

I'm using sshx locally to test this, and can reproduce the issue. Maybe 
your MINGW64 configuration is smoothing over the bug for you. When I 
tested this, I started from the MS-Windows "cmd.exe" and ran "emacs -Q", 
with "ssh.exe" in my PATH.

In Emacs 28, this worked fine, but it regressed in 29. I believe this is 
due to commit cee1cbfd54375cdece23d4741ced6b0c7091f6d9, which changes 
how Eshell manages its PATH env var.

I think what Eshell would want here is to set its environment variables 
*only* for the subprocess it creates via 'make-process'. For local 
subprocesses, I don't think we need to do anything fancy, but for the 
remote case, we'd need a way to say "use the original 
process-environment for all the Tramp code, but use this new 
process-environment for the actual subprocess". Maybe there's already a 
way to do this, or maybe we need to add some new powers to 
'make-process' or something...





  reply	other threads:[~2023-08-27 18:48 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-26 14:11 bug#65551: 29.1; Eshell on MS-Windows using plink: 'plink' is not recognized as an internal or external command Jordan Wilson
2023-08-26 14:42 ` Eli Zaretskii
2023-08-26 14:48   ` Jordan Wilson
2023-08-26 15:12     ` Eli Zaretskii
2023-08-26 19:16 ` Jim Porter
2023-08-26 21:28   ` Jordan Wilson
2023-08-27  6:30     ` Jim Porter
2023-08-27 17:55   ` Michael Albinus
2023-08-27 17:50 ` Michael Albinus
2023-08-27 18:48   ` Jim Porter [this message]
2023-08-28 10:27     ` Michael Albinus
2023-08-28 16:29       ` Jim Porter
2023-08-28 16:47         ` Jim Porter
2023-08-28 16:53           ` Jim Porter
2023-08-28 17:40             ` Michael Albinus
2023-09-08  1:18             ` Jim Porter
2023-08-28 17:33           ` Michael Albinus
2023-08-28 18:01             ` Jim Porter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3792bc23-2bad-8262-c674-26cec9d47b65@gmail.com \
    --to=jporterbugs@gmail.com \
    --cc=65551@debbugs.gnu.org \
    --cc=jordan.t.wilson@gmx.com \
    --cc=michael.albinus@gmx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.