From: Michael Albinus <michael.albinus@gmx.de>
To: Jim Porter <jporterbugs@gmail.com>
Cc: Jordan Wilson <jordan.t.wilson@gmx.com>, 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: Mon, 28 Aug 2023 12:27:59 +0200 [thread overview]
Message-ID: <877cpf31hs.fsf@gmx.de> (raw)
In-Reply-To: <3792bc23-2bad-8262-c674-26cec9d47b65@gmail.com> (Jim Porter's message of "Sun, 27 Aug 2023 11:48:36 -0700")
[-- Attachment #1: Type: text/plain, Size: 1688 bytes --]
Jim Porter <jporterbugs@gmail.com> writes:
Hi Jim,
>> 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.
Yes, with this scenario I see the problem as well.
> 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...
AFAICS, the problem is in eshell-environment-variables, which sets PATH
to the remote path. There are good reasons that Tramp doesn't handle the
PATH environment variable, but uses its own tramp-remote-path variable.
I've applied the following sledge-hammer patch, which cures the problem
for me. But I'm pretty sure there are better ways in Eshell to fix this.
Best regards, Michael.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 596 bytes --]
diff --git a/lisp/eshell/esh-var.el b/lisp/eshell/esh-var.el
index 711c35f8527..4c5ce1a1a35 100644
--- a/lisp/eshell/esh-var.el
+++ b/lisp/eshell/esh-var.el
@@ -459,7 +459,7 @@ eshell-environment-variables
environment, as specified in `eshell-variable-aliases-list'."
(let ((process-environment (eshell-copy-environment)))
(dolist (var-alias eshell-variable-aliases-list)
- (if (nth 2 var-alias)
+ (if (and (not (string-equal (car var-alias) "PATH")) (nth 2 var-alias))
(setenv (car var-alias)
(eshell-stringify
(or (eshell-get-variable (car var-alias)) "")))))
next prev parent reply other threads:[~2023-08-28 10:27 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
2023-08-28 10:27 ` Michael Albinus [this message]
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=877cpf31hs.fsf@gmx.de \
--to=michael.albinus@gmx.de \
--cc=65551@debbugs.gnu.org \
--cc=jordan.t.wilson@gmx.com \
--cc=jporterbugs@gmail.com \
/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.