GNU bug report logs - #18875
25.0.50; Dired -- add support for ls --time-style with a space

Previous Next

Package: emacs;

Reported by: Keith David Bershatsky <esq <at> lawlist.com>

Date: Tue, 28 Oct 2014 16:45:02 UTC

Severity: minor

Found in version 25.0.50

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #25 received at 18875 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> linkov.net>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 18875 <at> debbugs.gnu.org
Subject: Re: bug#18875: 25.0.50; Dired -- add support for ls --time-style
 with a space
Date: Sun, 22 Aug 2021 11:32:07 +0300
>> So...  dired supports spaces in command line arguments, but you have to
>> quote the argument, so I'm closing this bug report.  However, there's a
>> bug in `split-string-and-unquote', so I'm opening a new report for that.
>
> Or...  the problem isn't in that function -- it works as designed, and
> parses a Lisp-style string correctly.
>
> `insert-directory' should be using `split-string-shell-command' instead,
> and I've now done that in Emacs 28.

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"

split-string-and-unquote parses switches correctly:
("--dired" "-Alv" ""--block-size='1" "-t")

But split-string-shell-command does a wrong thing:
("--dired" "-Alv"" "--block-size=1 -t")

and ls fails:
/bin/ls: invalid suffix in --block-size argument '1 -t'




This bug report was last modified 3 years and 278 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.