all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Kevin Rodgers <kevin.d.rodgers@gmail.com>
To: bug-gnu-emacs@gnu.org
Subject: bug#8447: Undoing M-x revert-buffer
Date: Mon, 11 Apr 2011 22:25:39 -0600	[thread overview]
Message-ID: <io0k7r$51j$1@dough.gmane.org> (raw)
In-Reply-To: <BANLkTimy8sRUdr4g3th6xibDFZd6bYDmUw@mail.gmail.com>

On 4/8/11 9:54 AM, Hrvoje Nikšić wrote:
> It would be nice to be able to undo a revert-buffer operation.
>
> I've just had a situation where I used M-x revert-buffer, and
> immediately wanted to see the old version again.  (I wanted to briefly
> compare the old and new contents, which only differed in several
> characters.)  I routinely pressed C-_, and got a "no undo data" message
> in the echo area.  For the shortest instant I was surprised, but I
> quickly remembered that M-x revert-buffer clears the undo stack, and
> that it has always worked that way.
>
> But I would like to question this design choice.  What I wanted to do
> was not really unreasonable.  The buffer held several kilobytes of data,
> and my computer has gigabytes of memory at its disposal, enough room to
> hold the buffer contents literally a million times over.  If you think
> about it, reverting an existing buffer is just another operation on
> buffer text, not that different than M-x erase-buffer followed by M-x
> insert-file, which would happily remember everything.
>
> If the maintainers agree in principle, I'd like to look into patching
> revert-buffer so it records the revert as it would any other change to
> the buffer text.

In the short term, or if the maintainers do not agree to Hrvoje's proposal,
how about adding a warning to the "Revert buffer from file FILE? " yes-or-no-p
prompt?

-- 
Kevin Rodgers
Denver, Colorado, USA






  parent reply	other threads:[~2011-04-12  4:25 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 [this message]
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

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='io0k7r$51j$1@dough.gmane.org' \
    --to=kevin.d.rodgers@gmail.com \
    --cc=bug-gnu-emacs@gnu.org \
    /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.