unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@linkov.net>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: 18875@debbugs.gnu.org
Subject: bug#18875: 25.0.50; Dired -- add support for ls --time-style with a space
Date: Sun, 22 Aug 2021 11:32:07 +0300	[thread overview]
Message-ID: <87mtpahtw8.fsf@mail.linkov.net> (raw)
In-Reply-To: <87wnoh5xcy.fsf@gnus.org> (Lars Ingebrigtsen's message of "Thu, 19 Aug 2021 16:21:17 +0200")

>> 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'





  reply	other threads:[~2021-08-22  8:32 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 [this message]
2021-08-22 15:00         ` Lars Ingebrigtsen
2021-08-23  7:18           ` Juri Linkov
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=87mtpahtw8.fsf@mail.linkov.net \
    --to=juri@linkov.net \
    --cc=18875@debbugs.gnu.org \
    --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).