unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Karl Fogel <kfogel@red-bean.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: Lars Ingebrigtsen <larsi@gnus.org>, emacs-devel@gnu.org
Subject: Re: [PATCH] When deleting in bookmark menu, prompt for confirmation.
Date: Wed, 05 May 2021 16:38:10 -0500	[thread overview]
Message-ID: <874kfguail.fsf@red-bean.com> (raw)
In-Reply-To: <jwvo8dpgdoc.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Wed, 05 May 2021 16:06:10 -0400")

On 05 May 2021, Stefan Monnier wrote:
>> Hmm, I can understand, but... let me give you my best argument 
>> for why to do
>> this instead of implementing undo:
>
>Makes a lot of sense to me, yes.
>While the idea of "undo" was brought up in response to your 
>proposal and
>can indeed be seen as providing a similar functionality, I think 
>the two
>are mostly orthogonal.

Glad to hear that.  +1 to the rest of your analysis below, too, 
including that last part about how for undo purposes the Bookmark 
Menu buffer can be thought of as "visiting" the file in which 
bookmarks are saved.  (However, users are much less directly 
exposed to the bookmark file than they are to the regular kind of 
file that one visits, edits, and saves -- so the analogy fits 
mostly but perhaps not perfectly.  A person could in theory use 
bookmarks regularly without ever needing to be aware that the file 
even exists.)

I don't plan to implement the undo functionality myself.  It's a 
larger task than I want to take on.  Or rather, if I were going to 
find time to do something of that size in Emacs, there are other 
things I would pick before this.  However, it's good to have all 
these thoughts archived here, in case anyone else decides to do 
it. 

Best regards,
-Karl

>> First of all, I think this option is useful on its own, with or 
>> without
>> undo.
>
>Agreed.  And similarly undo would be useful with or without such
>a confirmation prompt.
>
>> Also, implementing undo functionality would open up a whole lot
>> of questions.
>
>Yes, it's an interesting field.  I hope someone will tackle this 
>problem.
>
>> If Bookmark Menu mode supports undo, do Bookmark operations in
>> general support undo?
>
>I'd say yes, but in order to save the user the trouble of saying 
>"undo
>bookmark operation" (as opposed to undoing other things), I think 
>it's
>OK to limit oneself to supporting the `undo` command within the
>bookmark-menu buffer.
>
>I think to make it work well, we'd also want to make sure the 
>bookmark
>menu is always up-to-date with the bookmark data structure 
>(i.e. any
>external change to the bookmarks would be immediately reflected 
>in a
>bookmark menu if there is one (with a corresponding undo entry)).
>
>> If so, which ones?  And even just within Bookmark
>> Menu, what else should be undo-able?
>
>I think it would make sense to make "everything" in there 
>undoable.
>We might even be able to support `undo-in-region` ;-)
>
>>  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?
>
>If you think of the bookmark-menu as the buffer that visits the 
>bookmark
>file, then it would be natural that "save" is not part of the 
>operations
>that are recorded in the undo log (and the `**` in the modeline 
>might
>try and reflect the "saved" state like we do for normal files).
>
>
>        Stefan



  reply	other threads:[~2021-05-05 21:38 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-03  3:43 [PATCH] When deleting in bookmark menu, prompt for confirmation Karl Fogel
2021-05-03  9:16 ` Lars Ingebrigtsen
2021-05-03 12:48   ` Stefan Kangas
2021-05-03 13:02     ` Stefan Monnier
2021-05-04  7:53     ` Lars Ingebrigtsen
2021-05-04 16:29       ` [External] : " Drew Adams
2021-05-03 11:41 ` Eli Zaretskii
2021-05-03 12:47   ` Stefan Kangas
2021-05-03 13:16     ` Eli Zaretskii
2021-05-03 15:43       ` Stefan Kangas
2021-05-03 16:25         ` Eli Zaretskii
2021-05-03 17:21         ` Karl Fogel
2021-05-03 17:41           ` Eli Zaretskii
2021-05-03 18:28             ` Jim Porter
2021-05-03 18:44               ` Eli Zaretskii
2021-05-03 19:01                 ` Jim Porter
2021-05-03 20:52             ` Karl Fogel
2021-05-05  5:24             ` Karl Fogel
2021-05-05  8:11               ` Lars Ingebrigtsen
2021-05-05 19:37                 ` Karl Fogel
2021-05-05 20:06                   ` Stefan Monnier
2021-05-05 21:38                     ` Karl Fogel [this message]
2021-05-05 23:17                       ` [External] : " Drew Adams
2021-05-05 23:25                         ` Karl Fogel
2021-05-06  6:52                         ` Matthias Meulien
2021-05-06 15:29                           ` Drew Adams
2021-05-08 20:46                             ` Matthias Meulien
2021-05-09  8:54                               ` Eli Zaretskii
2021-05-09 18:37                                 ` Karl Fogel
2021-05-09 18:39                                   ` Eli Zaretskii
2021-05-25  5:38                                     ` Karl Fogel
2021-05-25 12:09                                       ` Eli Zaretskii
2021-05-25 20:24                                         ` Karl Fogel
2021-05-26 11:59                                           ` Eli Zaretskii
2021-05-26 19:33                                             ` Karl Fogel
2021-05-07 17:42                           ` Karl Fogel
2021-05-07 22:24                             ` Drew Adams
2021-05-08  6:13                               ` Karl Fogel
2021-05-06  8:49                   ` Lars Ingebrigtsen
2021-05-06 13:30                     ` Stefan Monnier
2021-05-07  8:40                       ` Lars Ingebrigtsen
2021-05-07 12:55                         ` Stefan Monnier
2021-05-09  9:55                           ` Lars Ingebrigtsen
2021-05-09 15:04                             ` Stefan Kangas
2021-05-09 18:01                               ` Stefan Monnier
2021-05-10  8:30                               ` Lars Ingebrigtsen
2021-05-07 17:40                     ` Karl Fogel
2021-05-05 11:56               ` Eli Zaretskii
2021-05-05 21:43                 ` Karl Fogel
2021-05-03 17:43           ` [External] : " Drew Adams

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=874kfguail.fsf@red-bean.com \
    --to=kfogel@red-bean.com \
    --cc=emacs-devel@gnu.org \
    --cc=larsi@gnus.org \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).