Subject: Re: bug#16818: Acknowledgement (Undo in region after markers in undo history relocated)

From: Barry OReilly <[email-masked]>
Date: Wed, 12 Mar 2014 21:59:55 -0400

> Thinking more about this, I think this is fixing the symptom, but
> not the cause. The cause is that primitive-undo shouldn't blindly
> obey a (MARKER . OFFSET) entry. Instead it should only obey it if
> the marker still points at the corresponding place.

>From what I can tell, the root cause is relocating markers to
unrelated locations in the buffer while another part of Emacs still
has a reference to it.

Your counter proposal is a step from the root. For instance, the
markers within the mark rings will not adjust correctly, whilst with
my patch they will.

I think your proposal sounds good nonetheless. I don't doubt there are
other markers that could get swept up into the undo history, become
relocated, and then annoy users of undo in region.

> (creating new markers each time instead)

My patch actually results in fewer markers created.