GNU bug report logs - #65551
29.1; Eshell on MS-Windows using plink: 'plink' is not recognized as an internal or external command...

Previous Next

Package: emacs;

Reported by: Jordan Wilson <jordan.t.wilson <at> gmx.com>

Date: Sat, 26 Aug 2023 14:13:02 UTC

Severity: normal

Found in version 29.1

Full log


View this message in rfc822 format

From: Jim Porter <jporterbugs <at> gmail.com>
To: Michael Albinus <michael.albinus <at> gmx.de>, Jordan Wilson <jordan.t.wilson <at> gmx.com>
Cc: 65551 <at> 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
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 <at> 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...




This bug report was last modified 1 year and 285 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.