[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#23785: Emacs 25: "Undo" overdoes things.
From: |
Eli Zaretskii |
Subject: |
bug#23785: Emacs 25: "Undo" overdoes things. |
Date: |
Sat, 18 Jun 2016 10:54:56 +0300 |
> From: phillip.lord@russet.org.uk (Phillip Lord)
> Cc: Alan Mackenzie <acm@muc.de>, 23785@debbugs.gnu.org
> Date: Fri, 17 Jun 2016 22:47:20 +0100
>
> The following patch addresses the issue in my hands. I'd welcome
> confirmation.
>
> Stefan what do you think? You suggested something like this for
> Bug#22295 also. I think that the problem is the same; if I read
> insert-file-contents correctly, it disables collection of undo
> information. I may well be reading it wrong though.
>
> Given that this has turned up in two places now, it may be a wider
> problem, and the more general solution might be the better one. It might
> also invalidate the necessity for 12e009e52, but I haven't tested that
> yet.
>
> Alternatively, revert-buffer could just force undo-boundary.
>
> >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
I'd indeed suggest to have on emacs-25 a change that only affects
revert-buffer, and have the above on master. It sounds too scary to
make a change that affects all commands this late in the pretest.
Thanks.
- bug#23785: Emacs 25: "Undo" overdoes things., Alan Mackenzie, 2016/06/17
- bug#23785: Emacs 25: "Undo" overdoes things., Eli Zaretskii, 2016/06/17
- bug#23785: Emacs 25: "Undo" overdoes things., Alan Mackenzie, 2016/06/17
- bug#23785: Emacs 25: "Undo" overdoes things., Eli Zaretskii, 2016/06/17
- bug#23785: Emacs 25: "Undo" overdoes things., Phillip Lord, 2016/06/17
- bug#23785: Emacs 25: "Undo" overdoes things., Stefan Monnier, 2016/06/18
- bug#23785: Emacs 25: "Undo" overdoes things.,
Eli Zaretskii <=
- bug#23785: Emacs 25: "Undo" overdoes things., Stefan Monnier, 2016/06/18
- bug#23785: Emacs 25: "Undo" overdoes things., Eli Zaretskii, 2016/06/18
- bug#23785: Emacs 25: "Undo" overdoes things., Stefan Monnier, 2016/06/18
- bug#23785: Emacs 25: 'Undo' overdoes things., Phillip Lord, 2016/06/19
- bug#23785: Emacs 25: 'Undo' overdoes things., Stefan Monnier, 2016/06/19
- bug#23785: Emacs 25: 'Undo' overdoes things., Phillip Lord, 2016/06/20
- bug#23785: Emacs 25: 'Undo' overdoes things., Stefan Monnier, 2016/06/20
- bug#23785: Emacs 25: 'Undo' overdoes things., Phillip Lord, 2016/06/20
- bug#23785: Emacs 25: 'Undo' overdoes things., Eli Zaretskii, 2016/06/20
- bug#23785: Emacs 25: 'Undo' overdoes things., Phillip Lord, 2016/06/20