From: Jim Porter <jporterbugs@gmail.com>
To: Michael Albinus <michael.albinus@gmx.de>
Cc: 49229@debbugs.gnu.org
Subject: bug#49229: 27.2; `M-x shell' fails over TRAMP from local MS Windows
Date: Sat, 26 Jun 2021 11:01:41 -0700 [thread overview]
Message-ID: <CANh=_JFiPJ1KXuDxskjBy8rQ5Jg+prEzgwhbf1P0M-HrHCGq9Q@mail.gmail.com> (raw)
In-Reply-To: <87h7hkpufg.fsf@gmx.de>
On Sat, Jun 26, 2021 at 7:33 AM Michael Albinus <michael.albinus@gmx.de> wrote:
>
> Occasionally, I've seen this problem on MS Windows already. Since I
> don't run anything on MS Windows unless for bug hunting, I couldn't
> locate it yet. With your recipe, it's reproducible now. It's not related
> to "M-x shell" only, but more general.
Looking at your patch, it makes sense to me. It's not where I
originally expected the fix to go, but I remember some previous corner
cases that were fixed with `tramp-drop-volume-letter', so this should
be good.
> I've pushed a fix to the master branches of Emacs and Tramp. Could you,
> pls, check?
I tested on MS Windows and it works correctly for me. (Note that I
just copied and eval'ed the new version of `tramp-file-name-handler',
since I don't have a proper build environment on MS Windows.)
While testing it, I discovered one other oddity though. This doesn't
necessarily need a fix, but it's a bit surprising, and I'll mention it
here in case someone thinks it's a problem worth fixing.
If I erase the default text and instead enter
"C:/Windows/System32/cmd.exe" into the `M-x shell' prompt, it treats
*that* as a remote path too. Now, the prompt does say to enter a
*remote* shell path, so if I enter a local path, I made a mistake.
However, the default shell path for `M-x shell' from a remote
directory is a TRAMP path ("/sshx:server:/path/to/some//bin/sh"), so
it's surprising that when I delete the TRAMP host prefix, I still end
up running a shell on the remote server.
Perhaps it would be nicer if, when `M-x shell' prompted for the remote
shell path, it didn't include the TRAMP prefix by default (e.g. the
default value would just be "/bin/sh"). That might not interact well
with `read-file-name' completion though; is it possible to use
file-name completion on a remote path without the TRAMP prefix?
next prev parent reply other threads:[~2021-06-26 18:01 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-25 23:05 bug#49229: 27.2; `M-x shell' fails over TRAMP from local MS Windows Jim Porter
2021-06-26 14:33 ` Michael Albinus
2021-06-26 18:01 ` Jim Porter [this message]
2021-06-27 8:41 ` Michael Albinus
2021-06-28 0:47 ` Jim Porter
2021-06-28 6:18 ` Michael Albinus
2021-07-01 17:07 ` Jim Porter
2021-07-02 12:58 ` Michael Albinus
2021-07-02 21:30 ` Jim Porter
2021-07-03 6:42 ` Michael Albinus
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='CANh=_JFiPJ1KXuDxskjBy8rQ5Jg+prEzgwhbf1P0M-HrHCGq9Q@mail.gmail.com' \
--to=jporterbugs@gmail.com \
--cc=49229@debbugs.gnu.org \
--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).