emacs-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] When deleting in bookmark menu, prompt for confirmation.


From: Lars Ingebrigtsen
Subject: Re: [PATCH] When deleting in bookmark menu, prompt for confirmation.
Date: Thu, 06 May 2021 10:49:15 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Karl Fogel <kfogel@red-bean.com> writes:

> Giving people the ability to prevent the bad thing from happening
> is not the same as giving them ability to recover if the bad thing
> happens.

It's not the same -- giving them the ability to recover is better.  :-)
We're teaching users to hit "y" after a whole bunch of commands, and the
"y" becomes automatic.

> Also, implementing undo functionality would open up a whole lot of
> questions.

It does, but a thing like this doesn't have to be 100% to be useful.
Every new thing that's made undoable is progress.

> Well, there is the etc/NEWS entry, but still I kind of agree with you.
> I would have chosen the default-to-true route, though Eli's preference
> for the other way is perfectly reasonable; this isn't a One Right Way
> situation IMHO.

There isn't, but if it's worth having a query, then that query is worth
the most to new users -- more experienced users can then choose to
switch it off or on.  Adding this option, but defaulting it to nil
doesn't add much value, in my opinion.  Anybody can add a prompter to
any command by just doing:

(advice-add 'bookmark-bmenu-execute-deletions :before
            (lambda () (unless (y-or-n-p "Really execute?") (error "Nope"))))

Perhaps we should just make a convenience function for people to add
prompters to any command they want to...

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no



reply via email to

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