GNU bug report logs -
#8447
Undoing M-x revert-buffer
Previous Next
Reported by: Hrvoje Nikšić <hniksic <at> gmail.com>
Date: Fri, 8 Apr 2011 16:17:02 UTC
Severity: wishlist
Merged with 10776
Fixed in version 24.4
Done: Glenn Morris <rgm <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
Message #11 received at submit <at> debbugs.gnu.org (full text, mbox):
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
This bug report was last modified 11 years and 364 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.