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: Karl Fogel
Subject: Re: [PATCH] When deleting in bookmark menu, prompt for confirmation.
Date: Mon, 03 May 2021 12:21:36 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

On 03 May 2021, Stefan Kangas wrote:
Eli Zaretskii <eliz@gnu.org> writes:

I don't see how backwards-compatibility is relevant here, but perhaps
you could provide more specifics.

We are now asking for confirmation where previously no question was
asked, or am I missing something?

My point is that backwards compatibility is not necessarily the most important consideration in this case, and that such a stance would at
least need some elaborating.

AFAICT, we routinely make "backward incompatible" changes where we see a need for it. (But of course we do them with care and consideration.)

Luckily, you provided your reasoning below:

Questions that pop where previously Emacs did something silently can be annoying, which is why I'd prefer to turn this off by default. If
someone wants the new behavior, they can enable it.

That's fair enough.  To me, the danger of accidentally deleting a
bookmarks still seems more important. On the one hand, we have lived with that for a long time, OTOH that is no reason not to try to do
better.

I agree with Stefan's reasoning here.

Backward compatibility is a big deal in an API, but it's a much smaller deal in an interactive interface behavior. Yes, users will be prompted in a place where they weren't prompted before, but the prompt is self-explanatory, and the old behavior was needlessly dangerous -- it's easy to type "x" accidentally and lose bookmarks marked for deletion before one had finalized the list.

If someone had suggested this when I was first implementing the Bookmark Menu, I think I would have incorporated the suggestion then and just had this behavior from the beginning. The fact that it's a change in interactive behavior now is minor compared to the benefit.

I agree that it should get a NEWS entry, of course, and agree with Lars' suggestions of `:version' and some documentation tweaks.
Regarding the question of using an undo-based method instead:

Lars Ingebrigtsen wrote:
In general, I think it's better to offer undo instead of prompting. That's not always possible, but I think in the bookmark case, that shouldn't be too difficult -- just register an undo action that inserts
the items that were removed, I think?

I think that's not as good as the confirmation-prompt here, for two reasons. One, the discoverability issue raised by Stefan Kangas in his reply; two, Bookmark Menu has a similar basic look-and-feel to Dired Mode, with which many users are probably already familiar, and Dired does exactly this kind of confirmation prompt by default for deleting files. If Bookmark just behaves the way Dired does by default, that would be consistent with [at least some] users' expectations.

Best regards,
-Karl



reply via email to

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