From: Stefan Monnier <monnier@IRO.UMontreal.CA>
To: Juri Linkov <juri@jurta.org>
Cc: emacs-devel@gnu.org
Subject: Re: Quotes in Dired listing switches
Date: Wed, 23 Dec 2009 22:18:58 -0500 [thread overview]
Message-ID: <jwvzl5912ri.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <87vdfy5om7.fsf@mail.jurta.org> (Juri Linkov's message of "Wed, 23 Dec 2009 11:07:27 +0200")
> (setq dired-listing-switches "-al --block-size=\"'1\"")
[...]
> (apply 'call-process
> insert-directory-program nil t nil
> '("--dired" "-al" "--block-size=\"'1\"" "--" "/tmp/."))
[...]
> then Dired works correctly, but with e.g. `C-x d /sudo::/tmp'
> Tramp hangs because the unmatched single quote causes the shell
> to wait for the closing quote.
Obviously, there's a problem in the inconsistent parsing of
dired-listing-switches, where the basic code splits it at spaces without
doing any additional unquoting or analysis, whereas the Tramp code seems
to just pass it as-is to the shell (so if you set it to "-al $(rm -rf ~/.)"
it will try to do something funny).
I won't claim that the basic code's naive splitting is great, but
Tramp's similarly naive use is not great either. So, I suggest to treat
it as a bug in Tramp which should split it like the basic code and then
shell-quote-argument the parts.
Stefan
next prev parent reply other threads:[~2009-12-24 3:18 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-23 9:07 Quotes in Dired listing switches Juri Linkov
2009-12-24 3:18 ` Stefan Monnier [this message]
2009-12-26 20:21 ` Michael Albinus
2009-12-28 10:29 ` Juri Linkov
2009-12-28 11:14 ` Michael Albinus
2009-12-28 21:08 ` Juri Linkov
2009-12-29 9:10 ` Michael Albinus
2009-12-29 20:35 ` Juri Linkov
2009-12-29 21:04 ` Michael Albinus
2009-12-29 17:10 ` Stefan Monnier
2009-12-30 19:46 ` Michael Albinus
2010-01-11 0:43 ` Juri Linkov
2010-01-25 9:29 ` Juri Linkov
2010-01-25 10:35 ` Eli Zaretskii
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=jwvzl5912ri.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=emacs-devel@gnu.org \
--cc=juri@jurta.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).