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

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

bug#29465: 25.3; Confusing message for dired-do-shell-command substituti


From: Tino Calancha
Subject: bug#29465: 25.3; Confusing message for dired-do-shell-command substitution
Date: Tue, 28 Nov 2017 12:50:52 +0900
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Allen Li <vianchielfaura@gmail.com>
>> 
>>   find ? -name '*.txt'
>> 
>> but not for
>> 
>>   find * -name '*.txt'
>> 
>> Thus, it isn't even useful for protecting against some hypothetical
>> unwanted behavior.
>
> Tino added this confirmation last July, so I will let him defend his
> change.
>
> If we want to remove this confirmation, now is the time, because it
> wasn't yet released with any Emacs version.  Once this confirmation is
> out at large, it will be much harder to remove it, as that would be an
> incompatible change.
Thanks for your report Allen!

FWIW the confirmation was added by RMS in 2002
(eab9ed67eb50bab4fc736058a799508d544606a0).
See also commits:
commit e52c37fad057b29d68c51cf3a70b2e0d94f656cb
commit edb8d73e62552cf2f95cbf871050913862dc5f18

My commit "Ask confirmation for all suspicious wildcards"
(6e39940adba7b96dfe520caa52a1b92a1a84a84f)
extends that confirmation to cover Bug#27496.

Before 6e39940adb, not all `?' or `*' were checked for
being between white spaces:
! echo ./? RET ; This ask confirmation
! echo ./? ? RET ; This doesn't

After 6e39940adb, all occurrences of `?' or `*' are checked for
being between white spaces; the user is asked confirmation if
any of them are not surrounded by whites.
I made this change for consistency: I thought it has sense to
check all `?' `*' occurrences, not just one.

In fact, this change causes that you are prompted in your snippet:
! find * -name '*.txt' RET 
;; After (before) 6e39940adb you are (not) prompted.

Compare with the following:
! find ? -name '*.txt' RET 
;; After and before 6e39940adb you are prompted.

Your second patch disables the confirmation prompts that have
being around since 2002.  Since the source of this bug report
seems to be 6e39940adb, I would rather revert just this commit.





reply via email to

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