[Top][All Lists]

[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: Wed, 05 May 2021 14:37:37 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

On 05 May 2021, Lars Ingebrigtsen wrote:
Karl Fogel <kfogel@red-bean.com> writes:

Revised patch attached, with the option now defaulting to nil (i.e., to the old behavior) as per discussion. Review/comments welcome.

Lars, you wrote this regarding v1 of this patch:

...the first line [of the doc string] should be a complete sentence.

It actually was a complete sentence even in v1, but I think I know what you meant. However, the "Non-nil means..." phrasing is found throughout Emacs -- I counted over 1000 places with this quick check:

What I meant was that the first line should be a complete sentence. :-)

Ah, right! I forgot that sometimes "line" means literally "line", right. Ahem. Sorry :-). You said exactly what you meant, and I somehow read something different.

In any case, as I said -- I don't think adding this user option makes a lot of sense. Instead bookmark should implement "undo" functionality.

Hmm, I can understand, but... let me give you my best argument for why to do this instead of implementing undo:

First of all, I think this option is useful on its own, with or without undo. It did come from a user request, after all, which was seconded (on Emacs Humanities) by at least one other person besides me. 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.

Also, implementing undo functionality would open up a whole lot of questions. If Bookmark Menu mode supports undo, do Bookmark operations in general support undo? If so, which ones? And even just within Bookmark Menu, what else should be undo-able? Renaming? What about retargeting? And there's the usual bevy of undo-boundary questions: suppose someone does 'x' to execute deletions, then 's' to save the current state of the bookmarks list. If they then undo, should it undo the deletions but not save the result, or should it also save?

Personally, I'm not prepared to go down this road; it's a lot of work and complexity. The situation that needed addressing in Bookmark Menu was simply that it's too easy to accidentally hit 'x' and delete things that you weren't ready to delete. Solving this one problem, in the same way that Dired solves it, seems clean and useful to me.

And adding the option, but defaulting to nil, makes even less sense --
nobody is going to discover this option unless it defaults to t.

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.

Discoverability problems would exist with undo, too, of course.

Best regards,

reply via email to

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