GNU bug report logs -
#28569
25.2; dired-sort-toggle-or-edit vs. quote marks
Previous Next
Reported by: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
Date: Sat, 23 Sep 2017 13:43:01 UTC
Severity: minor
Found in version 25.2
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 28569 in the body.
You can then email your comments to 28569 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#28569
; Package
emacs
.
(Sat, 23 Sep 2017 13:43:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Sat, 23 Sep 2017 13:43:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
User sees arguments with embedded spaces on
(info "(coreutils) Formatting file timestamps")
and tries one.
He types C-u s which runs the command dired-sort-toggle-or-edit
and at the prompt gives:
ls switches (must contain -l): -olt --time-style='+%Y-%m-%d %H:%M:%S.%N %z'
Alas, it turns out if the string contains any kind of quote mark, the
entire dired screen will go blank, with the error
insert-directory: Listing directory failed but ‘access-file’ worked
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#28569
; Package
emacs
.
(Sat, 23 Sep 2017 14:00:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 28569 <at> debbugs.gnu.org (full text, mbox):
> From: 積丹尼 Dan Jacobson
> <jidanni <at> jidanni.org>
> Date: Sat, 23 Sep 2017 19:18:29 +0800
>
> User sees arguments with embedded spaces on
> (info "(coreutils) Formatting file timestamps")
> and tries one.
>
> He types C-u s which runs the command dired-sort-toggle-or-edit
> and at the prompt gives:
>
> ls switches (must contain -l): -olt --time-style='+%Y-%m-%d %H:%M:%S.%N %z'
>
> Alas, it turns out if the string contains any kind of quote mark, the
> entire dired screen will go blank, with the error
>
> insert-directory: Listing directory failed but ‘access-file’ worked
Did you read the doc string of dired-listing-switches? It explains
how to specify long options that include whitespace. (Hint: Dired is
not a shell, so shell-style quoting is not necessarily appropriate.)
Oh, I see that Emacs 25.2 doesn't yet have that bit in the doc string.
Well, but what will become Emacs 26.1 does. Here's that text, for
your convenience:
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.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#28569
; Package
emacs
.
(Sat, 23 Sep 2017 14:18:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 28569 <at> debbugs.gnu.org (full text, mbox):
Maybe the docstring should remind that --option=\"value with spaces\"
won't work.
EZ> Options that include embedded whitespace must be quoted
EZ> like this: \"--option=value with spaces\"; you can use
EZ> ‘combine-and-quote-strings’ to produce the correct quoting of
EZ> each option.
Actually perhaps just parse the line like the shell does... And then
both would work.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#28569
; Package
emacs
.
(Sat, 23 Sep 2017 14:26:01 GMT)
Full text and
rfc822 format available.
Message #14 received at 28569 <at> debbugs.gnu.org (full text, mbox):
> Date: Sat, 23 Sep 2017 16:59:10 +0300
> From: Eli Zaretskii <eliz <at> gnu.org>
> Cc: 28569 <at> debbugs.gnu.org
>
> 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.
Sorry, that should be
"--option=value with spaces"
without the backslashes.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#28569
; Package
emacs
.
(Sat, 23 Sep 2017 14:37:01 GMT)
Full text and
rfc822 format available.
Message #17 received at 28569 <at> debbugs.gnu.org (full text, mbox):
I think the user should just be able to enter things to C-u s just like
he does in the shell. And C-u s should parse the arguments for him.
I don't see what the advantage of having him enter
"--option=value with spaces"
instead of
--option="value with spaces" is.
Both should work in my opinion, and whatever dirty work of parsing
should be done behind the scenes by the program.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#28569
; Package
emacs
.
(Sat, 23 Sep 2017 14:59:01 GMT)
Full text and
rfc822 format available.
Message #20 received at 28569 <at> debbugs.gnu.org (full text, mbox):
> From: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
> Cc: 28569 <at> debbugs.gnu.org
> Date: Sat, 23 Sep 2017 22:36:31 +0800
>
> I don't see what the advantage of having him enter
> "--option=value with spaces"
> instead of
> --option="value with spaces" is.
Dired is not a shell, so what works and/or is equivalent for a shell
doesn't need to work the same in Dired. Just follow the docs.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#28569
; Package
emacs
.
(Tue, 30 Nov 2021 15:09:01 GMT)
Full text and
rfc822 format available.
Message #23 received at 28569 <at> debbugs.gnu.org (full text, mbox):
Eli Zaretskii <eliz <at> gnu.org> writes:
>> I don't see what the advantage of having him enter
>> "--option=value with spaces"
>> instead of
>> --option="value with spaces" is.
>
> Dired is not a shell, so what works and/or is equivalent for a shell
> doesn't need to work the same in Dired. Just follow the docs.
So there doesn't seem to be anything to fix here, and I'm closing this
bug report.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
bug closed, send any further explanations to
28569 <at> debbugs.gnu.org and 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Tue, 30 Nov 2021 15:09:02 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Wed, 29 Dec 2021 12:24:08 GMT)
Full text and
rfc822 format available.
This bug report was last modified 3 years and 196 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.