unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Michael Albinus <michael.albinus@gmx.de>
To: Eli Zaretskii <eliz@gnu.org>
Cc: jporterbugs@gmail.com, 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: Mon, 21 Mar 2022 15:06:28 +0100	[thread overview]
Message-ID: <87v8w7pfh7.fsf@gmx.de> (raw)
In-Reply-To: <83wngneawo.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 21 Mar 2022 14:40:39 +0200")

Eli Zaretskii <eliz@gnu.org> writes:

Hi Eli,

> Is it really a good idea to solve this only for Grep?  Shouldn't shell
> quoting always use this logic (with some variable that callers could
> bind in exceptional cases, which I presume will be rare)?  Or am I
> missing something?

I had the same feeling after sending the patch, so I've started to
rework this. I came out with the following solution:

--8<---------------cut here---------------start------------->8---
shell-quote-argument is a compiled Lisp function in
‘../../../src/emacs/lisp/subr.el’.

(shell-quote-argument ARGUMENT &optional POSIX)

Quote ARGUMENT for passing as argument to an inferior shell.

This function is designed to work with the syntax of your system’s
standard shell, and might produce incorrect results with unusual shells.
See Info node ‘(elisp)Security Considerations’.

If the optional POSIX argument is non-nil, ARGUMENT is quoted
according to POSIX rules.
--8<---------------cut here---------------end--------------->8---

I'll wait until Jim confirms that this works in general, then I would
apply a patch along this spec.

Best regards, Michael.





  reply	other threads:[~2022-03-21 14:06 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-21  4:58 bug#54487: 29.0.50; connection-local value for `shell-file-name' not set in Dired buffers over Tramp Jim Porter
2022-03-21 10:25 ` Michael Albinus
2022-03-21 12:40   ` Eli Zaretskii
2022-03-21 14:06     ` Michael Albinus [this message]
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=87v8w7pfh7.fsf@gmx.de \
    --to=michael.albinus@gmx.de \
    --cc=54487@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --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).