unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#33084: 26.1.50; Outdated revert-buffer documentation
@ 2018-10-18 15:11 Mauro Aranda
  2018-10-18 15:30 ` Mauro Aranda
  0 siblings, 1 reply; 3+ messages in thread
From: Mauro Aranda @ 2018-10-18 15:11 UTC (permalink / raw)
  To: 33084

Hello.

Regarding the Emacs manual, I think the following paragraph in the
"Reverting a Buffer" section is outdated:
"Reverting marks the buffer as not modified. It also clears the buffer's undo
history (see Undo). Thus, the reversion cannot be undone—if you change your
mind yet again, you can't use the undo commands to bring the reverted changes
back."

I think that was the previous behavior of revert-buffer, but it was changed
a while ago, so now it is possible to do M-x revert-buffer RET yes RET
and then do
C-/ to bring the reverted changes back.


In GNU Emacs 26.1.50 (build 3, i686-pc-linux-gnu, GTK+ Version 3.18.9)
 of 2018-10-16 built on the-blackbeard
Repository revision: 433e364add25dcc32f5103ec28f58298e00204d5
Windowing system distributor 'The X.Org Foundation', version 11.0.11906000
System Description:	Ubuntu 16.04.5 LTS





^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#33084: 26.1.50; Outdated revert-buffer documentation
  2018-10-18 15:11 bug#33084: 26.1.50; Outdated revert-buffer documentation Mauro Aranda
@ 2018-10-18 15:30 ` Mauro Aranda
  2018-10-19  8:59   ` Eli Zaretskii
  0 siblings, 1 reply; 3+ messages in thread
From: Mauro Aranda @ 2018-10-18 15:30 UTC (permalink / raw)
  To: 33084

[-- Attachment #1: Type: text/plain, Size: 744 bytes --]

2018-10-18 12:11 GMT-03:00, Mauro Aranda <maurooaranda@gmail.com>:
> Hello.
>
> Regarding the Emacs manual, I think the following paragraph in the
> "Reverting a Buffer" section is outdated:
> "Reverting marks the buffer as not modified. It also clears the buffer's
> undo
> history (see Undo). Thus, the reversion cannot be undone—if you change your
> mind yet again, you can't use the undo commands to bring the reverted
> changes
> back."
>
> I think that was the previous behavior of revert-buffer, but it was changed
> a while ago, so now it is possible to do M-x revert-buffer RET yes RET
> and then do
> C-/ to bring the reverted changes back.
>
>

I propose the attached patch.  Please let me know what you think.

[-- Attachment #2: 0001-Update-revert-buffer-documentation.patch --]
[-- Type: text/x-patch, Size: 1419 bytes --]

From 1cc0b5c9533719a13dc4ead942564c8586541fdb Mon Sep 17 00:00:00 2001
From: Mauro Aranda <maurooaranda@gmail.com>
Date: Thu, 18 Oct 2018 11:28:18 -0300
Subject: [PATCH] Update revert-buffer documentation

* doc/emacs/files.texi (Reverting): Document that revert-buffer
does keep undo history.  (Bug#33084)

; Copyright-paperwork-exempt: yes
---
 doc/emacs/files.texi | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/doc/emacs/files.texi b/doc/emacs/files.texi
index c7d3b40..2fd8591 100644
--- a/doc/emacs/files.texi
+++ b/doc/emacs/files.texi
@@ -932,10 +932,10 @@ Reverting
 approximately the same part of the text as before.  But if you have
 made major changes, point may end up in a totally different location.
 
-  Reverting marks the buffer as not modified.  It also clears the
-buffer's undo history (@pxref{Undo}).  Thus, the reversion cannot be
-undone---if you change your mind yet again, you can't use the undo
-commands to bring the reverted changes back.
+  Reverting marks the buffer as not modified.  However, it adds the
+reverted changes as a single modification to the buffer's undo
+history (@pxref{Undo}).  Thus, after reverting, you can do @kbd{C-/}
+to bring the reverted changes back, if you happen to change your mind.
 
   Some kinds of buffers that are not associated with files, such as
 Dired buffers, can also be reverted.  For them, reverting means
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* bug#33084: 26.1.50; Outdated revert-buffer documentation
  2018-10-18 15:30 ` Mauro Aranda
@ 2018-10-19  8:59   ` Eli Zaretskii
  0 siblings, 0 replies; 3+ messages in thread
From: Eli Zaretskii @ 2018-10-19  8:59 UTC (permalink / raw)
  To: Mauro Aranda; +Cc: 33084-done

> From: Mauro Aranda <maurooaranda@gmail.com>
> Date: Thu, 18 Oct 2018 12:30:42 -0300
> 
> > I think that was the previous behavior of revert-buffer, but it was changed
> > a while ago, so now it is possible to do M-x revert-buffer RET yes RET
> > and then do
> > C-/ to bring the reverted changes back.
> >
> >
> 
> I propose the attached patch.  Please let me know what you think.

Thanks, pushed to the emacs-26 branch.





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-10-19  8:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-18 15:11 bug#33084: 26.1.50; Outdated revert-buffer documentation Mauro Aranda
2018-10-18 15:30 ` Mauro Aranda
2018-10-19  8:59   ` Eli Zaretskii

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