GNU bug report logs - #35564
27.0.50; [PATCH] Tweak dired-do-shell-command warning about "wildcard" characters

Previous Next

Package: emacs;

Reported by: Kévin Le Gouguec <kevin.legouguec <at> gmail.com>

Date: Sat, 4 May 2019 18:03:02 UTC

Severity: normal

Tags: fixed, moreinfo, patch

Merged with 28969

Found in version 27.0.50

Fixed in version 28.1

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

Bug is archived. No further changes may be made.

Full log


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

From: Kévin Le Gouguec <kevin.legouguec <at> gmail.com>
To: 35564 <at> debbugs.gnu.org
Cc: Michael Heerdegen <michael_heerdegen <at> web.de>,
 Noam Postavsky <npostavs <at> gmail.com>, Juri Linkov <juri <at> linkov.net>,
 Stefan Monnier <monnier <at> iro.umontreal.ca>, Eli Zaretskii <eliz <at> gnu.org>,
 Drew Adams <drew.adams <at> oracle.com>
Subject: Re: bug#35564: [PATCH v5] Tweak dired warning about "wildcard"
 characters
Date: Tue, 22 Oct 2019 17:10:54 +0200
[Message part 1 (text/plain, inline)]
Casual and nonchalant bump.

I realize that everyone has their plate full right now (Emacs has tabs!
Face extension beyond EOL is customizable!  What a time to be alive!),
so I am not expecting this to get any immediate attention.  In case it
helps though, here is a comparison when running e.g. sed 's/?/!/':

Old prompt:

> Confirm--do you mean to use ‘?’ as a wildcard? (y or n)

New prompt based on read-multiple-choice:

> Warning: 1 occurrence of ‘?’ will not be substituted.  Proceed?
> ([Y]es, [N]o, toggle [D]etails, [?]):

Hitting 'd' pops a buffer showing more information[1].  The commands
then become:

> ([Y]es, [N]o, toggle [D]etails, toggle [M]arkers, [?])

Hitting 'm' shows/hides '^' markers below the occurrences; 'd' quits the
details window.

Screenshots in GUI session:

[gui-basic.png (image/png, attachment)]
[gui-details.png (image/png, attachment)]
[gui-markers.png (image/png, attachment)]
[Message part 5 (text/plain, inline)]
Screenshots in TTY:

[tty-basic.png (image/png, attachment)]
[tty-details.png (image/png, attachment)]
[tty-markers.png (image/png, attachment)]
[Message part 9 (text/plain, inline)]
The patch(es) can be found in my previous message[2] (along with some
context and rationale).  Let me know if there is anything I can do to
help with the review.

Thank you for your time.


[1] Contents of the details buffer:

    > If your command contains occurrences of ‘*’ surrounded by
    > whitespace, ‘dired-do-shell-command’ substitutes them for the
    > entire file list to process.  Otherwise, if your command contains
    > occurrences of ‘?’ surrounded by whitespace or ‘`’, Dired will
    > run the command once for each file, substituting ‘?’ for each
    > file name.
    >
    > Your command contains occurrences of ‘?’ that will not be
    > substituted, and will be passed through normally to the shell.
    >
    > sed 's/?/!/'

    '?' is highlighted with the warning face.

[2] https://debbugs.gnu.org/cgi/bugreport.cgi?bug=35564#157

This bug report was last modified 4 years and 296 days ago.

Previous Next


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