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: Allen Li
Subject: bug#29465: 25.3; Confusing message for dired-do-shell-command substitution
Date: Tue, 28 Nov 2017 12:13:11 -0800

On Tue, Nov 28, 2017 at 8:26 AM, Eli Zaretskii <eliz@gnu.org> wrote:
> I think we should try to make the prompt more clear, it cannot be that
> hard.  Removing the prompt will introduce backward incompatibility
> with what Emacs was doing for the past 15 years, so it's a worse
> alternative, IMO.

I don't care personally, if there's an option to disable it, but I am
not convinced for the sake of the betterment of Emacs.  I don't see
how removing the prompt introduces backward incompatibility issues
unless someone has a keyboard macro saved that includes a "y" to
handle this case (which I suppose is a possible use case, but I think
we have to draw the line somewhere; would improving Emacs performance
be a breaking change because someone was relying on a certain function
call taking at least a certain amount of time?).  This is changing
interactive usage, not API usage.

> You need to look up relevant discussions on Emacs mailing lists around
> the date of the commit.  In this case, read this thread:
>
>   http://lists.gnu.org/archive/html/emacs-devel/2002-01/msg00233.html
>
> and also the original bug report and its followups:
>
>   http://lists.gnu.org/archive/html/bug-gnu-emacs/2002-01/msg00230.html
>
>> If I were to hazard a guess, the behavior of the command was
>> changed, so the prompt was added to warn users accustomed to the old
>> behavior.
>
> No, it was a bug report about a potentially risky feature, where a
> user mistyping a command could have their files wiped out or cause
> some other grave accident.

Thanks for that.  But the confirmation prompt doesn't actually address
said bug.  Mistyping `M-! rm *' instead of `! rm *' will still wipe
out your files with no confirmation.  I don't accept that `! rm *""',
the case covered by the confirmation prompt, is a common typo.

Basically, I'm not convinced that this is protecting against a
common case of user error.  I would appreciate it if someone
could provide a concrete example of such a user error (or ideally
two or three examples).

> The syntax of the shell commands supported by dired-do-shell-command
> and its features regarding '*' and '?' are still very complicated, as
> they were back then.  Just the doc string describing the behavior is
> so long it can scare.  So I don't see how the time that has passed is
> of relevance here.

If dired-do-shell-command is complicated enough to scare, as you
say, I think presenting the user with an ambiguous confirmation
prompt scares even more.  The confirmation prompt implies that
the user is doing something dangerous, when in all likelihood the
user is doing nothing of the sort.  Again, I would like to see a
concrete example of a user error this prompt actually protects
against.

With all of that said, I am fine with adding an option, since I can
just set it and be on my merry way.  But I think Emacs would benefit
from not having this prompt (and I would be happy to be convinced
otherwise).





reply via email to

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