all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: phillip.lord@russet.org.uk (Phillip Lord)
To: Eli Zaretskii <eliz@gnu.org>
Cc: acm@muc.de, 23785@debbugs.gnu.org, monnier@iro.umontreal.ca
Subject: bug#23785: Emacs 25: 'Undo' overdoes things.
Date: Tue, 21 Jun 2016 15:29:47 +0100	[thread overview]
Message-ID: <87ziqety1w.fsf@russet.org.uk> (raw)
In-Reply-To: <83eg7q7k9b.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 21 Jun 2016 16:18:40 +0300")

Eli Zaretskii <eliz@gnu.org> writes:

>> From: phillip.lord@russet.org.uk (Phillip Lord)
>> Cc: "Eli Zaretskii" <eliz@gnu.org>,  acm@muc.de,  23785@debbugs.gnu.org
>> Date: Mon, 20 Jun 2016 16:03:35 +0100
>> 
>> My suggestion: this patch goes to Emacs-25. And the previous patch
>> (which automatically adds an undo boundary to current-buffer regardless
>> of changes), goes to master.
>
> So can you please show the "previous" patch?  There were too many of
> them.


This one, to master.

>From 2ab1f314ad6fe0e68420cc510445495467d82b8f Mon Sep 17 00:00:00 2001
From: Phillip Lord <phillip.lord@russet.org.uk>
Date: Fri, 17 Jun 2016 22:34:50 +0100
Subject: [PATCH] Fix missing undo-boundary after revert-buffer

* lisp/simple.el (undo-auto--boundaries): Ensure an undo-boundary after
  every command whether it (apparently) changes the buffer or not.

Addresses Bug#23785
---
 lisp/simple.el | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lisp/simple.el b/lisp/simple.el
index b66827d..3110430 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -2875,6 +2875,10 @@ undo-auto--boundaries
   "Check recently changed buffers and add a boundary if necessary.
 REASON describes the reason that the boundary is being added; see
 `undo-last-boundary' for more information."
+  ;; (Bug #23785) All commands should ensure that there is an undo
+  ;; boundary whether they have changed the current buffer or not.
+  (when (eq cause 'command)
+    (add-to-list 'undo-auto--undoably-changed-buffers (current-buffer)))
   (dolist (b undo-auto--undoably-changed-buffers)
           (when (buffer-live-p b)
             (with-current-buffer b
-- 
2.8.4





  reply	other threads:[~2016-06-21 14:29 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-17 15:02 bug#23785: Emacs 25: "Undo" overdoes things Alan Mackenzie
2016-06-17 17:15 ` Eli Zaretskii
2016-06-17 17:45   ` Alan Mackenzie
2016-06-17 20:07     ` Eli Zaretskii
2016-06-17 21:47       ` Phillip Lord
2016-06-18  4:46         ` Stefan Monnier
2016-06-18  7:54         ` Eli Zaretskii
2016-06-18 18:42           ` Stefan Monnier
2016-06-18 19:02             ` Eli Zaretskii
2016-06-18 19:52               ` Stefan Monnier
2016-06-19 22:45                 ` bug#23785: Emacs 25: 'Undo' " Phillip Lord
2016-06-20  0:59                   ` Stefan Monnier
2016-06-20 12:47                     ` Phillip Lord
2016-06-20 14:04                       ` Stefan Monnier
2016-06-20 15:03                   ` Phillip Lord
2016-06-20 15:34                     ` Eli Zaretskii
2016-06-20 17:12                       ` Phillip Lord
2016-06-21 13:17                         ` Eli Zaretskii
2016-06-21 14:30                           ` Phillip Lord
2016-06-21 21:25                         ` Stefan Monnier
2016-06-21 22:08                           ` Phillip Lord
2020-09-04 14:03                             ` Lars Ingebrigtsen
2020-09-05 13:15                               ` Alan Mackenzie
2016-06-21 13:18                     ` Eli Zaretskii
2016-06-21 14:29                       ` Phillip Lord [this message]
2016-06-21 16:13                         ` Eli Zaretskii
2016-06-17 21:23     ` bug#23785: Emacs 25: "Undo" " Phillip Lord
2016-06-18 17:41       ` Alan Mackenzie
2016-06-17 21:49     ` Óscar Fuentes
2016-06-20 12:33       ` Phillip Lord

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=87ziqety1w.fsf@russet.org.uk \
    --to=phillip.lord@russet.org.uk \
    --cc=23785@debbugs.gnu.org \
    --cc=acm@muc.de \
    --cc=eliz@gnu.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 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.