From: Juri Linkov <juri@linkov.net>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: Keith David Bershatsky <esq@lawlist.com>, 18875@debbugs.gnu.org
Subject: bug#18875: 25.0.50; Dired -- add support for ls --time-style with a space
Date: Mon, 23 Aug 2021 10:18:45 +0300 [thread overview]
Message-ID: <87r1ekestu.fsf@mail.linkov.net> (raw)
In-Reply-To: <87tujhy16q.fsf@gnus.org> (Lars Ingebrigtsen's message of "Sun, 22 Aug 2021 17:00:13 +0200")
>> The commit 04f723dec944eaa7b5e99373840a8bf920ba5fdd
>> broke my config with the error signaled by insert-directory:
>> (error "Listing directory failed but ‘access-file’ worked")
>>
>> When dired-listing-switches is customized to
>> "-Alv --block-size='1"
>
> Hm, well, that's not a valid shell string, is it?
>
> It should be "-Alv --block-size=\"'1\"" or something like that to be
> valid...
Then split-string-shell-command parses correctly:
(split-string-shell-command "-Alv --block-size=\"'1\"")
("-Alv" "--block-size='1")
but split-string-and-unquote fails:
(split-string-and-unquote "-Alv --block-size=\"'1\"")
("-Alv" "--block-size=" "'1")
> Hm... Oh! The doc string actually documents this (that it's not using
> shell quoting).
>
> ---
> Options that include embedded whitespace must be quoted
> like this: "--option=value with spaces"; you can use
> ‘combine-and-quote-strings’ to produce the correct quoting of
> each option.
> ---
Ah, now I see what is the correct way, and indeed both functions work
when dired-listing-switches is customized to "-Alv \"--block-size='1\"".
(split-string-shell-command "-Alv \"--block-size='1\"")
("-Alv" "--block-size='1")
(split-string-and-unquote "-Alv \"--block-size='1\"")
("-Alv" "--block-size='1")
> So this was the original answer to this bug report. I'll revert the
> change.
Thanks, it's good that don't need to amend the existing customization.
next prev parent reply other threads:[~2021-08-23 7:18 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-28 16:44 bug#18875: 25.0.50; Dired -- add support for ls --time-style with a space Keith David Bershatsky
2014-10-28 17:04 ` Eli Zaretskii
2014-10-28 17:10 ` Keith David Bershatsky
2021-08-19 14:15 ` Lars Ingebrigtsen
2021-08-19 14:21 ` Lars Ingebrigtsen
2021-08-22 8:32 ` Juri Linkov
2021-08-22 15:00 ` Lars Ingebrigtsen
2021-08-23 7:18 ` Juri Linkov [this message]
2014-10-28 17:33 ` Keith David Bershatsky
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=87r1ekestu.fsf@mail.linkov.net \
--to=juri@linkov.net \
--cc=18875@debbugs.gnu.org \
--cc=esq@lawlist.com \
--cc=larsi@gnus.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).