unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Michael Albinus <michael.albinus@gmx.de>
To: Jordan Wilson <jordan.t.wilson@gmx.com>
Cc: 65551@debbugs.gnu.org, Jim Porter <jporterbugs@gmail.com>
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 19:50:44 +0200	[thread overview]
Message-ID: <87sf84s7bf.fsf@gmx.de> (raw)
In-Reply-To: <861qfpnb9y.fsf@gmx.com> (Jordan Wilson's message of "Sat, 26 Aug 2023 15:11:53 +0100")

Jordan Wilson <jordan.t.wilson@gmx.com> writes:

> Hi all,

Hi Jordan & Jim,

> I've found a bug in Eshell on MS-Windows on 29.1. This is a regression
> from 28.2. When connected to a remote machine using putty's "plink",
> using any commands on the remote machine (e.g. not built-in to eshell)
> prints this error in the eshell buffer (details replaced):
>
> plink -l username -ssh -t example.com " env 'TERM=dumb'
> 'PROMPT_COMMAND=' 'PS1=#$ ' /bin/sh -i " ** exit || exit
> 'plink' is not recognised as an internal or external command, operable
> program or batch file.
>
> Recipe, starting from "emacs -Q":
> 1) open eshell
> 2) connect to a remote host using plink
> - cd /plink:username@example.com:/home/username/
> 3) ./test.sh (executable script)
> or...
> 3) *ls
> or...
> 3) (any remote command not built-in into Emacs)
>
> Below is the backtrace produced from this (using
> `toggle-debug-on-error') again with details replaced.

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?

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:

--8<---------------cut here---------------start------------->8---
Welcome to the Emacs shell

~ $ *hostname
win10
~ $ *uname -sr
MINGW64_NT-10.0-19045 3.2.0-340.x86_64
~ $ cd /sshx:detlef.fritz.box:
/sshx:detlef.fritz.box:~ $ *hostname
detlef
/sshx:detlef.fritz.box:~ $ *uname -sr
Linux 6.2.0-27-generic
/sshx:detlef.fritz.box:~ $ which hostname
/sshx:detlef.fritz.box://usr/bin/hostname
/sshx:detlef.fritz.box:~ $ *which hostname
/usr/bin/hostname
/sshx:detlef.fritz.box:~ $
--8<---------------cut here---------------end--------------->8---

> Thanks,
> Jordan.

Best regards, Michael.





  parent reply	other threads:[~2023-08-27 17:50 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 [this message]
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=87sf84s7bf.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).