From: phillip.lord@russet.org.uk (Phillip Lord)
To: Stefan Monnier <monnier@IRO.UMontreal.CA>
Cc: 22295@debbugs.gnu.org, Jim Meyering <jim@meyering.net>,
Michael Kifer <kifer@cs.stonybrook.edu>
Subject: bug#22295: viper-mode undo bug introduced between Nov 10 and Nov 14
Date: Fri, 10 Jun 2016 23:18:29 +0100 [thread overview]
Message-ID: <8760tghemi.fsf@russet.org.uk> (raw)
In-Reply-To: <jwvtwh1569s.fsf-monnier+bug#22295@gnu.org> (Stefan Monnier's message of "Fri, 10 Jun 2016 13:05:22 -0400")
Stefan Monnier <monnier@IRO.UMontreal.CA> writes:
>>> The old code seemed "simple" enough that the problem was probably
>>> simple to fix (once identified).
>> Well, most problems are simple to fix once you actually know what they
>> are.
>
> The problem seems to be the following: when you hit ESC, Viper will remove
> boundaries from the undo-list, without making any changes to the buffer,
> so the top-level loop won't add a boundary before the next command and
> ends up hence "amalgamating" the next command with the previous one.
>
> In the old code, we just always blindly added a boundary to
> current-buffer before running a command, whereas now we only do so if
> the buffer has been modified since the last time we pushed a boundary.
>
> I think the patch below fixes the original problem.
> Another way to fix it would be to change undo-auto--add-boundary so it
> always considers (current-buffer) regardless of
> undo-auto--undoably-changed-buffers.
Stefan
Many thanks for working this out -- I was going crazy trying to track
this down, and I was looking in the wrong place all along.
I've tried your patch against emacs-25 (after reverting c0139e32f1f3b)
and it appears to work. The current behaviour of undo-auto--add-boundary
seems sensible to me; the difference in behaviour only shows up because
viper is manipulating the undo-list. I can try modifying u-a--a-b though
-- viper is, I am sure, not the only package to fiddle with undo.
I'd propose adding this to emacs-25. Eli, are you happy with this --- my
last fix appears to not work and Stefans approach is much more discrete.
As a separate issue, I'd like to add part of c0139e32f1f3b back
though to master -- adding the variable undo-auto-disable-boundaries.
It's not immediately necessary now, but it seems a useful option to
have.
Phil
next prev parent reply other threads:[~2016-06-10 22:18 UTC|newest]
Thread overview: 54+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-03 4:01 bug#22295: viper-mode undo bug introduced between Nov 10 and Nov 14 Jim Meyering
2016-05-14 9:25 ` Eli Zaretskii
2016-05-14 10:01 ` Eli Zaretskii
2016-05-14 13:57 ` Phillip Lord
2016-05-14 20:10 ` Michael Kifer
2016-05-14 20:39 ` Phillip Lord
2016-05-14 20:50 ` Michael Kifer
2016-05-16 9:50 ` Phillip Lord
2016-05-17 3:38 ` Michael Kifer
2016-05-17 8:52 ` Phillip Lord
2016-05-17 13:58 ` Michael Kifer
2016-05-15 8:06 ` Michael Albinus
2016-05-16 12:37 ` Phillip Lord
2016-05-16 17:06 ` Michael Kifer
2016-05-16 2:31 ` Jim Meyering
2016-05-16 12:41 ` Phillip Lord
2016-05-16 15:39 ` Jim Meyering
2016-05-16 16:34 ` Eli Zaretskii
2016-05-16 17:14 ` Michael Kifer
2016-05-16 17:41 ` Eli Zaretskii
2016-05-17 8:48 ` Phillip Lord
2016-05-17 8:46 ` Phillip Lord
2016-05-17 14:05 ` Michael Kifer
2016-05-17 22:35 ` Phillip Lord
2016-05-17 8:25 ` Phillip Lord
2016-05-17 8:35 ` Phillip Lord
[not found] ` <CA+8g5KG=XBCc8U3u3D=+bh74sMLAH9R7ZUZ=SeQL9de=WQ71vQ@mail.gmail.com>
2016-05-18 9:15 ` Phillip Lord
2016-05-18 15:58 ` Jim Meyering
2016-05-18 21:42 ` Phillip Lord
2016-05-19 1:09 ` Jim Meyering
2016-05-20 10:00 ` Eli Zaretskii
2016-05-20 11:46 ` Phillip Lord
2016-05-20 13:32 ` Eli Zaretskii
2016-05-23 6:45 ` John Wiegley
2016-05-23 13:23 ` Phillip Lord
2016-05-24 15:43 ` Eli Zaretskii
2016-05-25 12:43 ` Phillip Lord
2016-05-25 16:28 ` Eli Zaretskii
2016-06-01 13:06 ` Stefan Monnier
2016-06-01 22:23 ` Phillip Lord
2016-06-01 22:34 ` Michael Kifer
2016-06-01 22:41 ` Phillip Lord
2016-06-01 22:47 ` Michael Kifer
2016-06-02 0:11 ` Stefan Monnier
2016-06-02 8:45 ` Phillip Lord
2016-06-10 17:05 ` Stefan Monnier
2016-06-10 22:18 ` Phillip Lord [this message]
2016-06-11 4:04 ` Stefan Monnier
2016-06-13 12:36 ` Phillip Lord
2016-06-11 7:34 ` Eli Zaretskii
2016-06-13 12:37 ` Phillip Lord
2016-06-13 13:06 ` Stefan Monnier
2016-06-15 4:40 ` Jim Meyering
2016-06-15 5:24 ` Michael Kifer
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8760tghemi.fsf@russet.org.uk \
--to=phillip.lord@russet.org.uk \
--cc=22295@debbugs.gnu.org \
--cc=jim@meyering.net \
--cc=kifer@cs.stonybrook.edu \
--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 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).