unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Barry OReilly <gundaetiapo@gmail.com>
Cc: 17235@debbugs.gnu.org
Subject: bug#17235: Undo in region adjusts past positions incorrectly
Date: Wed, 23 Apr 2014 13:56:14 -0400	[thread overview]
Message-ID: <jwvwqegx78d.fsf-monnier+emacsbugs@gnu.org> (raw)
In-Reply-To: <CAFM41H2JpBxC7qeyr_SFUDiBqfJvnWOMhasjxhFEgPs+d3bWng@mail.gmail.com> (Barry OReilly's message of "Wed, 23 Apr 2014 12:20:29 -0400")

> I attached the patch implementing this. The new
> undo-test-region-deletion test implements the recipe of this bug
> report. It fails with the current undo-make-selective-list code,
> passes with the new.

Looks good.  Please install into trunk.

> Do you recall why the code ceases to make the selective list when an
> element cross the region?

No idea, I've never been very familiar with that code.
My guess is that the author didn't know how to make it work correctly,
or didn't want to go through the trouble of making it work correctly.

> +;; More interesting is how to adjust the "ddd" insertion due to the
> +;; next undo-delta: (6 . -2). If the reinsertion of "ad" was an undo,
> +;; it is most sensical that the total "ddd" insertion adjustment be (7
> +;; . 10) -> (6 . 8) -> (7 . 10). However, if the reinsertion was a
> +;; normal user edit, then most sensical is: (7 . 10) -> (6 . 8) -> (8
> +;; . 10). The undo history is ambiguous about which.

I was not able to understand the above comment.


        Stefan





  reply	other threads:[~2014-04-23 17:56 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-10 14:00 bug#17235: Undo in region adjusts past positions incorrectly Barry OReilly
2014-04-23  2:31 ` Stefan Monnier
2014-04-23 16:20   ` Barry OReilly
2014-04-23 17:56     ` Stefan Monnier [this message]
2014-04-26 21:00       ` Barry OReilly
2014-05-02  0:49 ` bug#17235: Barry OReilly

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=jwvwqegx78d.fsf-monnier+emacsbugs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=17235@debbugs.gnu.org \
    --cc=gundaetiapo@gmail.com \
    /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).