all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Andreas Röhler" <andreas.roehler@easy-emacs.de>
To: Drew Adams <drew.adams@oracle.com>
Cc: 8447@debbugs.gnu.org
Subject: bug#8447: Undoing M-x revert-buffer
Date: Thu, 30 May 2013 18:57:33 +0200	[thread overview]
Message-ID: <51A784FD.3040700@easy-emacs.de> (raw)
In-Reply-To: <a681596f-44e9-4ed5-a078-e4a0c62a0aed@default>

Am 29.05.2013 15:27, schrieb Drew Adams:
>>>> I just installed into the trunk a patch which should make
>>>> revert-buffer undoable.
>>>
>>> FWIW, see my comment on this in the help list:
>>> http://lists.gnu.org/archive/html/help-gnu-emacs/2013-05/msg00671.html
>>>
>>> In sum, why?  And why no discussion?  Where was the "bug"?
>
>> as it happened, run sometimes into this:
>> reverting the buffer, which turned out not the right thing - but undo-
>> history was lost. Consider it a useful change, thanks.
>
> By "turned out not the right thing" I guess you mean that someone used `revert-buffer' interactively and by mistake.  And by mistake also _confirmed_ reverting.  Yes, it can happen (to anyone).
>
> So define a command `revert-buffer-keeping-undo', and use that interactively instead of `revert-buffer'.  Or define a variable (option or internal) `revert-buffer-keeps-undo'.
>
> What you cite is a user-interface issue - i.e., only for interactive use of the command.  Such a change, to safeguard against mistaken reverting, is akin to removing files to a trash bin instead of deleting them.  But we did not just willy nilly change the behavior of the basic function (command) `delete-file' when we added support for a recycle/trash bin.  That's not the right approach.
>
> With extra interactive protection as the only reason, this is also akin to some users (me, for instance) wanting `C-w' to prompt for confirmation if the region is over a certain size (as in wimpy-del.el).  Certainly such safeguard features can be useful.
>
> But this change goes way beyond offering users optional extra protection.  `revert-buffer' is also used in basic code.
>
> The right way to add such protection against mistaken reversion is to create a separate command or option, letting users choose to use it or not.  And leave the basic `revert-buffer' alone.
>
> FWIW, I agree that such a feature can be useful for reverting interactively.
>
> And why no discussion before making such a change?
>

Hi Drew,

thanks, okay, you are right opposing it then. Mistook the matter so far.

Cheers,

Andreas






      reply	other threads:[~2013-05-30 16:57 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-08 15:54 bug#8447: Undoing M-x revert-buffer Hrvoje Nikšić
2011-04-09  1:49 ` Stefan Monnier
2011-04-12  4:25 ` Kevin Rodgers
2013-05-29  1:08 ` Stefan Monnier
2013-05-29  3:15   ` Drew Adams
2013-05-29  6:17     ` Andreas Röhler
2013-05-29 13:27       ` Drew Adams
2013-05-30 16:57         ` Andreas Röhler [this message]

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

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

  git send-email \
    --in-reply-to=51A784FD.3040700@easy-emacs.de \
    --to=andreas.roehler@easy-emacs.de \
    --cc=8447@debbugs.gnu.org \
    --cc=drew.adams@oracle.com \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.