all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Jim Meyering <jim@meyering.net>
To: Phillip Lord <phillip.lord@russet.org.uk>
Cc: 22295@debbugs.gnu.org, Michael Kifer <kifer@cs.stonybrook.edu>
Subject: bug#22295: viper-mode undo bug introduced between Nov 10 and Nov 14
Date: Mon, 16 May 2016 08:39:15 -0700	[thread overview]
Message-ID: <CA+8g5KEDOzu0RWx4xq63gQa+SNAE0ApcN6rrmBoLUO6C+L6GdQ@mail.gmail.com> (raw)
In-Reply-To: <878tzatbte.fsf@russet.org.uk>

On Mon, May 16, 2016 at 5:41 AM, Phillip Lord
<phillip.lord@russet.org.uk> wrote:
...
> I have pushed a first attempt at a fix to branch fix/viper-undo.
> Clearly, it's not finished yet, but I'd like to get your feedback as to
> whether it works; it should fix the example given, but I haven't used
> viper at all, so if it breaks other things I won't know.
>
> I haven't managed to work out exactly why the error is happening --
> probably though because the timing of the undo-boundary is somewhat
> different, though. With this fix, viper just disables automatic boundary
> addition and adds it's own as necessary, which seems cleaner.

Thank you.
That does indeed fix the case I mentioned.
Here are some cases where it does not work as expected:

  start with an empty buffer in viper-mode
  type 'i 1 2 3 4 5ESC'
  type 'F2dw' to delete the 2 and a space.
  type 'wdw' to delete the 4 and a space.

Now, if I were to hit "u" to undo, I would expect that most recent
deletion to be undone and the 4 would reappear.
Then I would hit '.' to undo the deletion of the '2'. Finally one more
'.' would undo the creation of that first line.
However, with the current patches, that first 'u' undoes everything
and leaves me with the empty initial file.

Another example starting with an empty file:
Create some content via ':r!seq 999|fmt RETURN'
Then remove e.g., "222 " and "444 " via '/222' RET 'dw',
then '/444' RET 'dw'. Now, we expect a single 'u' to restore the '444 ',
yet it undoes everything, leaving an empty buffer.
Hmm... that's probably no different from the first example.

One more, then. Starting with this input:

  1 2 3 4 5 6

advance to the '2' with 'w', 'dw' to delete the 2, then three '.'s to
delete the 3, then 4 and 5.
Then begin to undo with 'u', then '.' to repeat it. Those first two
work, restoring the 5 and 4.
However, one more '.' restores both the 3 and the 2.





  reply	other threads:[~2016-05-16 15:39 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 [this message]
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
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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CA+8g5KEDOzu0RWx4xq63gQa+SNAE0ApcN6rrmBoLUO6C+L6GdQ@mail.gmail.com \
    --to=jim@meyering.net \
    --cc=22295@debbugs.gnu.org \
    --cc=kifer@cs.stonybrook.edu \
    --cc=phillip.lord@russet.org.uk \
    /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.