unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Jim Porter <jporterbugs@gmail.com>
To: Jordan Wilson <jordan.t.wilson@gmx.com>
Cc: 65551@debbugs.gnu.org, michael.albinus@gmx.de
Subject: bug#65551: 29.1; Eshell on MS-Windows using plink: 'plink' is not recognized as an internal or external command...
Date: Sat, 26 Aug 2023 23:30:05 -0700	[thread overview]
Message-ID: <5156e2ab-e4b3-a5ad-8a15-da7bcfe74439@gmail.com> (raw)
In-Reply-To: <86il91o5lz.fsf@gmx.com>

[-- Attachment #1: Type: text/plain, Size: 1035 bytes --]

On 8/26/2023 2:28 PM, Jordan Wilson wrote:
> Hi Jim,
> 
> On 2023-08-26 (Sat) at 12:16 (-0700), Jim Porter <jporterbugs@gmail.com> wrote:
>> Thanks for reporting this. I can reproduce this issue. Does evaluating the
>> following work?
>>
>>    (setf (alist-get 'tramp-login-program
>>                     (alist-get "plink" tramp-methods nil nil #'equal))
>>          (list (concat "\"" (executable-find "plink") "\"")))
>>
>> If so, I think I've identified the bug: in 'eshell-gather-process-output', we
>> set the 'process-environment' to Eshell's environment variables. In a remote
>> directory, this includes the remote PATH. However, that confuses Tramp, which
>> uses that remote PATH to look for the local "plink.exe".
> 
> I can confirm that snippet does resolve the problem.

Thanks for checking. That's probably the best way to get things working 
for now, but I'll make sure to get a fix for this in for Emacs 29.2. In 
the meantime, here's a regression test that we should be able to use to 
verify the fix once we have it.

[-- Attachment #2: remote-path-test.patch --]
[-- Type: text/plain, Size: 906 bytes --]

diff --git a/test/lisp/eshell/esh-proc-tests.el b/test/lisp/eshell/esh-proc-tests.el
index 8e02fbb5497..7d0432dbe68 100644
--- a/test/lisp/eshell/esh-proc-tests.el
+++ b/test/lisp/eshell/esh-proc-tests.el
@@ -259,4 +259,19 @@ esh-proc-test/kill-pipeline-head
                      output-start (eshell-end-of-output))
                     "")))))
 
+\f
+;; Remote processes
+
+(ert-deftest esh-var-test/remote/remote-path ()
+  "Ensure that setting the remote PATH in Eshell doesn't interfere with Tramp.
+See bug#65551."
+  (skip-unless (and (eshell-tests-remote-accessible-p)
+                    (executable-find "echo")))
+  (let ((default-directory ert-remote-temporary-file-directory))
+    (with-temp-eshell
+     (eshell-insert-command "set PATH ''")
+     (eshell-match-command-output
+      (format "%s hello" (executable-find "echo" t))
+      "\\`hello\n"))))
+
 ;;; esh-proc-tests.el ends here

  reply	other threads:[~2023-08-27  6:30 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 [this message]
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
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=5156e2ab-e4b3-a5ad-8a15-da7bcfe74439@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 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).