unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: Karl Fogel <kfogel@red-bean.com>,
	Stefan Monnier <monnier@iro.umontreal.ca>
Cc: Lars Ingebrigtsen <larsi@gnus.org>,
	"emacs-devel@gnu.org" <emacs-devel@gnu.org>
Subject: RE: [External] : Re: [PATCH] When deleting in bookmark menu, prompt for confirmation.
Date: Wed, 5 May 2021 23:17:49 +0000	[thread overview]
Message-ID: <SA2PR10MB447443F53A88CEC40585950BF3599@SA2PR10MB4474.namprd10.prod.outlook.com> (raw)
In-Reply-To: <874kfguail.fsf@red-bean.com>

> >> 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.

FWIW, I'm not warm to the idea of undoing operations,
here.

Consider undo in WDired.  You can just as easily want
to think of WDired as "visiting" a directory, but
that's problematic.  It's visiting a presentation of
a directory listing.  (Actually, the listing can be of
several directories, or even of arbitrary files located
anywhere.)

We support undoing text changes to the buffer in Wired.
But WDired doesn't perform operations _on the files_
listed.  (Dired does.)  It's a view of some files -
in that sense it "visits" them or their directory.
But the analogy of a buffer visiting a file is poor.

The bookmark-list display buffer (bookmark "menu") is
more analogous to Dired than WDired.  How much undo
does Dired support?  Only undo to what are, in effect
annotations (and not done via `undo' but by specific
operations such as unmarking etc.).

We don't support undo for its operations on files and
dirs that are listed.  If you use `x' to delete all
flagged files, there's no undo for that.  (We have a
move-to-trash possibility, but nothing with `undo'.)

And for good reason, I think.

This can certainly be discussed/explored more, but a
priori I think that direction is generally misguided,
especially from a user point of view.

Take the buffer-list display as another example.
Do we offer undo as a way to undo operations on
buffers there?  Should we?  I think not.  Not in
general.  Undo The Hammer is not the best way to
undo some things.

The bookmark-list display is, like Dired, a view
of a listing of things.  And no, those things are
not the bookmarks in "the bookmark file".  They're
the bookmarks in the _current bookmark list_.

The bookmarks in that list can be loaded from any
number of bookmark files, and more bookmarks can
be added on the fly, so that the list corresponds
to no bookmark file.

The only thing you can say about it is that if you
_save_ the current bookmark list then, by default,
its bookmarks will replace those in a particular
bookmark file.

[On the other hand, at least with Bookmark+, you
can save the bookmark-list display itself - its
current state - in a file.  And you can restore
it from that file (or another).  So perhaps there's
room for being able to undo some textual changes
in the bookmark-list display - like using undo in
WDired.  But I don't see that as a rich mine of
interest, at least not a priori.]

___

As for offering undo of `x' deletions as a
_substitute_ for prompting for confirmation:
that's simply wrong, IMO.  There are several
reasons that undo either won't help or can cause
harm in this context.  They've already been
pointed out.



  reply	other threads:[~2021-05-05 23:17 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
2021-05-05 23:17                       ` Drew Adams [this message]
2021-05-05 23:25                         ` [External] : " 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=SA2PR10MB447443F53A88CEC40585950BF3599@SA2PR10MB4474.namprd10.prod.outlook.com \
    --to=drew.adams@oracle.com \
    --cc=emacs-devel@gnu.org \
    --cc=kfogel@red-bean.com \
    --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).