bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#35564: [PATCH v5] Tweak dired warning about "wildcard" characters


From: Kévin Le Gouguec
Subject: bug#35564: [PATCH v5] Tweak dired warning about "wildcard" characters
Date: Tue, 22 Oct 2019 17:10:54 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

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:

Attachment: gui-basic.png
Description: PNG image

Attachment: gui-details.png
Description: PNG image

Attachment: gui-markers.png
Description: PNG image

Screenshots in TTY:

Attachment: tty-basic.png
Description: PNG image

Attachment: tty-details.png
Description: PNG image

Attachment: tty-markers.png
Description: PNG image

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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]