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 19:33:30 +0200 [thread overview]
Message-ID: <87il8zul5h.fsf@gmx.de> (raw)
In-Reply-To: <3e1db580-d1b3-1c96-ad3c-ba6e95eca8a3@gmail.com> (Jim Porter's message of "Mon, 28 Aug 2023 09:47:47 -0700")
Jim Porter <jporterbugs@gmail.com> writes:
Hi Jim,
> On 8/28/2023 9:29 AM, Jim Porter wrote:
>> On 8/28/2023 3:27 AM, Michael Albinus wrote:
>>> 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.
>> How about something like this? It's a little less invasive (but no
>> less of a hack).
>
> Oops, something more like this (let-binding 'tramp-remote-path').
Might work. But well, it is Tramp. Everything is more complex.
tramp-remote-path is just a template, It is taken the very first time
you connect to a remote host in order to determine proper PATH
settings. The result is cached in the connection property "remote-path".
Every new process for that remote host (like returned by make-process)
checks first, whether this connection property exists, and uses it. Only
if the connection property doesn't exist, it is recomputed starting with
tramp-remote-path.
So usually, you don't have to do anything wrt PATH. That's why my
sledge-hammer patch works.
If a user changes PATH for a remote connection in eshell (I don't recall
how, but I'm sure it is possible in Eshell), you just have to change the
respective connection property "remote-path" in Tramp.
See (info "(tramp) Predefined connection information")
There is an exception: If a user has the symbol tramp-own-remote-path
in tramp-remote-path, the cached value is not used for a new process,
and PATH is recomputed based on tramp-remote-path.
Writing this, it sounds to me too complex. OTOH, no other package has
tried yet to play with the remote PATH. There are bug reports by users
who request a simplification (bug#61926, bug#62326). Perhaps it is time
to redesign the machinery in Tramp.
Best regards, Michael.
next prev parent reply other threads:[~2023-08-28 17:33 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
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 [this message]
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87il8zul5h.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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).