unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Jim Porter <jporterbugs@gmail.com>
To: 54487@debbugs.gnu.org
Subject: bug#54487: 29.0.50; connection-local value for `shell-file-name' not set in Dired buffers over Tramp
Date: Sun, 20 Mar 2022 21:58:56 -0700	[thread overview]
Message-ID: <eeb8675a-9c86-2ac8-a155-8a2eb66beb43@gmail.com> (raw)

Hopefully I've summarized the issue correctly in the bug title. To see 
this in action, run the following from `emacs -Q' on an MS-Windows 
system ("host" in this example is a remote GNU/Linux system):

   C-x C-f /ssh:host:~
   M-x rgrep RET
   some text RET RET RET

The rgrep output will look something like:

   find [...] --null -e "some text" "{}" +
   find: paths must precede expression: `^^!^'

You can click the "[...]" to see the full invocation. However, even 
without doing that, if you look carefully, you'll notice that the 
shell-quoting uses the MS-Windows rules, not that of /bin/sh. For the 
MS-Windows shell, spaces are quoted by wrapping the entire argument in 
double-quotes ("like this"); for /bin/sh, spaces are escaped via a 
backslash (like\ this).

Presumably, that's because if you eval `shell-file-name' in the Dired 
buffer, it reports ".../path/to/cmdproxy.exe". When in a remote *file*, 
`shell-file-name' is correctly set to "/bin/sh".

This also comes up in other (non-Dired) situations. For example:

   C-x C-f /ssh:host:~/some-file.txt
   M-x rgrep RET
   some text RET RET RET
   ;; everything looks ok

   ;; now, from the rgrep buffer...
   M-x rgrep
   some text RET RET RET
   ;; same error as in the original case above





             reply	other threads:[~2022-03-21  4:58 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-21  4:58 Jim Porter [this message]
2022-03-21 10:25 ` bug#54487: 29.0.50; connection-local value for `shell-file-name' not set in Dired buffers over Tramp Michael Albinus
2022-03-21 12:40   ` Eli Zaretskii
2022-03-21 14:06     ` Michael Albinus
2022-03-21 14:52       ` Eli Zaretskii
2022-03-21 15:02         ` Michael Albinus
2022-03-21 15:05           ` Eli Zaretskii
2022-03-21 15:09             ` Michael Albinus
2022-03-21 18:04       ` Jim Porter
2022-03-22  9:44         ` Michael Albinus
2022-03-23 11:53           ` Michael Albinus
2022-03-23 16:55             ` Jim Porter
2022-03-23 18:58         ` 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=eeb8675a-9c86-2ac8-a155-8a2eb66beb43@gmail.com \
    --to=jporterbugs@gmail.com \
    --cc=54487@debbugs.gnu.org \
    /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).