GNU bug report logs - #16818
Undo in region after markers in undo history relocated

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Barry OReilly <gundaetiapo@HIDDEN>; dated Wed, 19 Feb 2014 22:17:01 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 16818 <at> debbugs.gnu.org:


Received: (at 16818) by debbugs.gnu.org; 25 Mar 2014 02:32:16 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Mar 24 22:32:16 2014
Received: from localhost ([127.0.0.1]:48290 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1WSH9z-0004IT-Po
	for submit <at> debbugs.gnu.org; Mon, 24 Mar 2014 22:32:16 -0400
Received: from mail-oa0-f52.google.com ([209.85.219.52]:57804)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <gundaetiapo@HIDDEN>) id 1WSH9x-0004II-KS
 for 16818 <at> debbugs.gnu.org; Mon, 24 Mar 2014 22:32:14 -0400
Received: by mail-oa0-f52.google.com with SMTP id l6so6768517oag.25
 for <16818 <at> debbugs.gnu.org>; Mon, 24 Mar 2014 19:32:12 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=mime-version:in-reply-to:references:date:message-id:subject:from:to
 :cc:content-type;
 bh=Gx6i3P5bRJBqMujpsVghLZcdfiI9XvWyITkBwxVMAAI=;
 b=nAtOhc+h8rYhQXi4nfVuYlpa42fIxlydRfQll4oq1CNiQIX+U19IDkMHqtEISnrZCe
 bdKVo8JDMQ+YBvmv1eI78r/yO/urZZFnAdnaNV7zgpWmUeO6k3HntHIehQy/Vo1OH8bw
 8lFCRLFYuAN/696feEtNAeXC5aAwP04SH+0dq/1xxpqOP3cFzoN1rA3IrovSo481YYur
 FDUd0hCTz0+SoW/80WjqP2X9PuRVUrctX/pKfzrO4BX3T0TSdZm8RhjeSTWX5KgHbYrR
 g1WacLtOMsVv4r3P6h7un4aY0nfVfv7EkMsVDfT4/aPCZs2t9A764G+sDkjbfznXZYU5
 XBQA==
MIME-Version: 1.0
X-Received: by 10.182.2.170 with SMTP id 10mr5114698obv.50.1395714732865; Mon,
 24 Mar 2014 19:32:12 -0700 (PDT)
Received: by 10.76.6.44 with HTTP; Mon, 24 Mar 2014 19:32:12 -0700 (PDT)
In-Reply-To: <jwv1txrdq3i.fsf-monnier+emacsbugs@HIDDEN>
References: <CAFM41H0EA=TyArGBMEwDWy5nbHsfmN8Ev77P2QrvmbMHifnmAg@HIDDEN>
 <handler.16818.B.13928481719895.ack <at> debbugs.gnu.org>
 <CAFM41H0dB_qCzwQLQ4g86Qwbt8VnvqYru=yf0TPD9UeL6qsUkQ@HIDDEN>
 <jwv1tyyo06q.fsf-monnier+emacsbugs@HIDDEN>
 <CAFM41H2Q-x8L9jPjUNk=9TJoc3mDz2P19UV0bK1RbZ-25nYQZg@HIDDEN>
 <jwvvbw2euon.fsf-monnier+emacsbugs@HIDDEN>
 <CAFM41H0J7GFE2andkrqR7Tdz2Nm4MPXY20sufUeR_OyyitwS=g@HIDDEN>
 <jwvtxb39fia.fsf-monnier+emacsbugs@HIDDEN>
 <CAFM41H3gjuKz4joOw3eLRoNkbJ43Dh37Kvfhocv-zpkLO8BjHg@HIDDEN>
 <jwvk3byz11x.fsf-monnier+emacsbugs@HIDDEN>
 <jwvlhwexjdk.fsf-monnier+emacsbugs@HIDDEN>
 <CAFM41H2fmREiVOm6Vh4KGeRLSLM99cMbsHKdHn_86p_dj=1yLw@HIDDEN>
 <jwva9co2xs4.fsf-monnier+emacsbugs@HIDDEN>
 <CAFM41H19PB=Ej2-Wx8Y-ZrGEDz=uptnxQx8yHxb2g444RP6V5w@HIDDEN>
 <jwvmwgmxbp0.fsf-monnier+emacsbugs@HIDDEN>
 <CAFM41H3fhb+adrtWfcSrimAcO+79tDqJbJFOA=HtLbAaX183cQ@HIDDEN>
 <jwv4n2nhirv.fsf-monnier+emacsbugs@HIDDEN>
 <CAFM41H1-o6ciGPN0m2y_V1NYfpJVOFuBLHL9g2fHrjDVb=QsfA@HIDDEN>
 <jwv1txrdq3i.fsf-monnier+emacsbugs@HIDDEN>
Date: Mon, 24 Mar 2014 22:32:12 -0400
Message-ID: <CAFM41H0kbzYQbGSqBZRQmHhCDygfQvfTtuT69i+qTBmVS6j4Sg@HIDDEN>
Subject: Re: bug#16818: Acknowledgement (Undo in region after markers in undo
 history relocated)
From: Barry OReilly <gundaetiapo@HIDDEN>
To: Stefan <monnier@HIDDEN>
Content-Type: multipart/alternative; boundary=f46d0444ea99dc3e7404f5652806
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 16818
Cc: 16818 <at> debbugs.gnu.org, toby-undo-tree@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

--f46d0444ea99dc3e7404f5652806
Content-Type: text/plain; charset=ISO-8859-1

Rev 116855. Leaving bug open because of mark ring issue.

--f46d0444ea99dc3e7404f5652806
Content-Type: text/html; charset=ISO-8859-1

<div dir="ltr">Rev 116855. Leaving bug open because of mark ring issue.<br><div class="gmail_extra"><br></div></div>

--f46d0444ea99dc3e7404f5652806--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#16818; Package emacs. Full text available.

Message received at 16818 <at> debbugs.gnu.org:


Received: (at 16818) by debbugs.gnu.org; 25 Mar 2014 01:29:04 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Mar 24 21:29:04 2014
Received: from localhost ([127.0.0.1]:48242 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1WSGAq-0001gh-0a
	for submit <at> debbugs.gnu.org; Mon, 24 Mar 2014 21:29:04 -0400
Received: from chene.dit.umontreal.ca ([132.204.246.20]:53232)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <monnier@HIDDEN>) id 1WSGAn-0001gK-Lx
 for 16818 <at> debbugs.gnu.org; Mon, 24 Mar 2014 21:29:02 -0400
Received: from pastel.home (lechon.iro.umontreal.ca [132.204.27.242])
 by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id s2P1TIjE012732;
 Mon, 24 Mar 2014 21:29:18 -0400
Received: by pastel.home (Postfix, from userid 20848)
 id D9DD1600AF; Mon, 24 Mar 2014 21:28:59 -0400 (EDT)
From: Stefan <monnier@HIDDEN>
To: Barry OReilly <gundaetiapo@HIDDEN>
Subject: Re: bug#16818: Acknowledgement (Undo in region after markers in undo
 history relocated)
Message-ID: <jwv1txrdq3i.fsf-monnier+emacsbugs@HIDDEN>
References: <CAFM41H0EA=TyArGBMEwDWy5nbHsfmN8Ev77P2QrvmbMHifnmAg@HIDDEN>
 <handler.16818.B.13928481719895.ack <at> debbugs.gnu.org>
 <CAFM41H0dB_qCzwQLQ4g86Qwbt8VnvqYru=yf0TPD9UeL6qsUkQ@HIDDEN>
 <jwv1tyyo06q.fsf-monnier+emacsbugs@HIDDEN>
 <CAFM41H2Q-x8L9jPjUNk=9TJoc3mDz2P19UV0bK1RbZ-25nYQZg@HIDDEN>
 <jwvvbw2euon.fsf-monnier+emacsbugs@HIDDEN>
 <CAFM41H0J7GFE2andkrqR7Tdz2Nm4MPXY20sufUeR_OyyitwS=g@HIDDEN>
 <jwvtxb39fia.fsf-monnier+emacsbugs@HIDDEN>
 <CAFM41H3gjuKz4joOw3eLRoNkbJ43Dh37Kvfhocv-zpkLO8BjHg@HIDDEN>
 <jwvk3byz11x.fsf-monnier+emacsbugs@HIDDEN>
 <jwvlhwexjdk.fsf-monnier+emacsbugs@HIDDEN>
 <CAFM41H2fmREiVOm6Vh4KGeRLSLM99cMbsHKdHn_86p_dj=1yLw@HIDDEN>
 <jwva9co2xs4.fsf-monnier+emacsbugs@HIDDEN>
 <CAFM41H19PB=Ej2-Wx8Y-ZrGEDz=uptnxQx8yHxb2g444RP6V5w@HIDDEN>
 <jwvmwgmxbp0.fsf-monnier+emacsbugs@HIDDEN>
 <CAFM41H3fhb+adrtWfcSrimAcO+79tDqJbJFOA=HtLbAaX183cQ@HIDDEN>
 <jwv4n2nhirv.fsf-monnier+emacsbugs@HIDDEN>
 <CAFM41H1-o6ciGPN0m2y_V1NYfpJVOFuBLHL9g2fHrjDVb=QsfA@HIDDEN>
Date: Mon, 24 Mar 2014 21:28:59 -0400
In-Reply-To: <CAFM41H1-o6ciGPN0m2y_V1NYfpJVOFuBLHL9g2fHrjDVb=QsfA@HIDDEN>
 (Barry OReilly's message of "Mon, 24 Mar 2014 18:10:30 -0400")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-NAI-Spam-Flag: NO
X-NAI-Spam-Threshold: 5
X-NAI-Spam-Score: 0
X-NAI-Spam-Rules: 1 Rules triggered
	RV4891=0
X-NAI-Spam-Version: 2.3.0.9362 : core <4891> : inlines <642> : streams
 <1144126> : uri <1708957>
X-Spam-Score: -1.9 (-)
X-Debbugs-Envelope-To: 16818
Cc: 16818 <at> debbugs.gnu.org, toby-undo-tree@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.9 (-)

>> Begs the question: why didn't (don't) we record marker adjustments
>> here (and other similar places)?
> I considered pursuing that question earlier, but opted for those
> callers to behave as before, at least for now.

Yes, it's definitely not for `emacs-24' in any case.

> I've attached the updated patch with your comments incorporated.  I'll
> install soon.

Thank you,


        Stefan




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#16818; Package emacs. Full text available.

Message received at 16818 <at> debbugs.gnu.org:


Received: (at 16818) by debbugs.gnu.org; 24 Mar 2014 22:10:42 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Mar 24 18:10:42 2014
Received: from localhost ([127.0.0.1]:48132 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1WSD4o-0003v6-7u
	for submit <at> debbugs.gnu.org; Mon, 24 Mar 2014 18:10:40 -0400
Received: from mail-oa0-f48.google.com ([209.85.219.48]:54049)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <gundaetiapo@HIDDEN>) id 1WSD4j-0003ut-Gy
 for 16818 <at> debbugs.gnu.org; Mon, 24 Mar 2014 18:10:36 -0400
Received: by mail-oa0-f48.google.com with SMTP id m1so6663399oag.35
 for <16818 <at> debbugs.gnu.org>; Mon, 24 Mar 2014 15:10:33 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=mime-version:in-reply-to:references:date:message-id:subject:from:to
 :cc:content-type;
 bh=WEr8889b8/2Js03ZYAJz3KeRD0hhgmdCSiyCiRh3OTA=;
 b=S0vzrs1UWSYiHQj/6lB2jpENxK7+Nq5e5TmudiYnQIlk255D9F44JjB0ndh1qhyToI
 HbsCa5vetuEZrkgNea42Fy0VUOiD/RfTjDnF2fB4/jdgexOYB8mfzoGAnnUS5y5jU33U
 0cFAXwz2AVa9pjLfmq5eIFrg4G07wBPuCNm9ypGIDxElRKIbC91sgHo7nf4fJ8WZ/35U
 tds/JD3pPhZWOsWzhoKBDxNHdeyzn4Do7aiwTDAQDTFxxX2ABZZQrKOXhqi+pSMDzog+
 W+q0AK/U7zu9dsBoPmyJ85RdjneNyueqvVrgAv16AaAiLv9DWQ60oxj0bJr2tgmC8Z8K
 02cw==
MIME-Version: 1.0
X-Received: by 10.60.83.234 with SMTP id t10mr58739828oey.4.1395699032974;
 Mon, 24 Mar 2014 15:10:32 -0700 (PDT)
Received: by 10.76.6.44 with HTTP; Mon, 24 Mar 2014 15:10:30 -0700 (PDT)
In-Reply-To: <jwv4n2nhirv.fsf-monnier+emacsbugs@HIDDEN>
References: <CAFM41H0EA=TyArGBMEwDWy5nbHsfmN8Ev77P2QrvmbMHifnmAg@HIDDEN>
 <handler.16818.B.13928481719895.ack <at> debbugs.gnu.org>
 <CAFM41H0dB_qCzwQLQ4g86Qwbt8VnvqYru=yf0TPD9UeL6qsUkQ@HIDDEN>
 <jwv1tyyo06q.fsf-monnier+emacsbugs@HIDDEN>
 <CAFM41H2Q-x8L9jPjUNk=9TJoc3mDz2P19UV0bK1RbZ-25nYQZg@HIDDEN>
 <jwvvbw2euon.fsf-monnier+emacsbugs@HIDDEN>
 <CAFM41H0J7GFE2andkrqR7Tdz2Nm4MPXY20sufUeR_OyyitwS=g@HIDDEN>
 <jwvtxb39fia.fsf-monnier+emacsbugs@HIDDEN>
 <CAFM41H3gjuKz4joOw3eLRoNkbJ43Dh37Kvfhocv-zpkLO8BjHg@HIDDEN>
 <jwvk3byz11x.fsf-monnier+emacsbugs@HIDDEN>
 <jwvlhwexjdk.fsf-monnier+emacsbugs@HIDDEN>
 <CAFM41H2fmREiVOm6Vh4KGeRLSLM99cMbsHKdHn_86p_dj=1yLw@HIDDEN>
 <jwva9co2xs4.fsf-monnier+emacsbugs@HIDDEN>
 <CAFM41H19PB=Ej2-Wx8Y-ZrGEDz=uptnxQx8yHxb2g444RP6V5w@HIDDEN>
 <jwvmwgmxbp0.fsf-monnier+emacsbugs@HIDDEN>
 <CAFM41H3fhb+adrtWfcSrimAcO+79tDqJbJFOA=HtLbAaX183cQ@HIDDEN>
 <jwv4n2nhirv.fsf-monnier+emacsbugs@HIDDEN>
Date: Mon, 24 Mar 2014 18:10:30 -0400
Message-ID: <CAFM41H1-o6ciGPN0m2y_V1NYfpJVOFuBLHL9g2fHrjDVb=QsfA@HIDDEN>
Subject: Re: bug#16818: Acknowledgement (Undo in region after markers in undo
 history relocated)
From: Barry OReilly <gundaetiapo@HIDDEN>
To: Stefan <monnier@HIDDEN>, toby-undo-tree@HIDDEN
Content-Type: multipart/mixed; boundary=089e0116019c131fcc04f5618169
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 16818
Cc: 16818 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

--089e0116019c131fcc04f5618169
Content-Type: multipart/alternative; boundary=089e0116019c131fc604f5618167

--089e0116019c131fc604f5618167
Content-Type: text/plain; charset=ISO-8859-1

[Adding Toby, since I mention undo-tree.]

> It would also be more conservative to keep this unchanged, but I
> think I agree with you here that we don't need to be *that*
> conservative.

This is how I addressed that:

diff --git a/lisp/simple.el b/lisp/simple.el
index 4a3a89c..6b5031e 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -2375,6 +2375,10 @@ we stop and ignore all further elements."
                    ;; This is a "was unmodified" element.
                    ;; Keep it if we have kept everything thus far.
                    (not some-rejected))
+                   ;; Skip over marker adjustments, instead relying on
+                   ;; finding them after (TEXT . POS) elements
+                   ((markerp (car-safe undo-elt))
+                    nil)
                   (t
                    (undo-elt-in-region undo-elt start end)))))
        (if keep-this
@@ -2461,7 +2465,7 @@ marker adjustment's corresponding (TEXT . POS)
element."
              (<= (abs (cdr undo-elt)) end)))
        ((and (consp undo-elt) (markerp (car undo-elt)))
         ;; (MARKER . ADJUSTMENT)
-         nil)
+         (<= start (car undo-elt) end))
        ((null (car undo-elt))
         ;; (nil PROPERTY VALUE BEG . END)
         (let ((tail (nthcdr 3 undo-elt)))

It maintains the same return from undo-elt-in-region for marker
adjustments as before.

I took a look at undo-tree. It doesn't use undo-make-selective-list,
but does use undo-elt-in-region. I guess that means this particular
bug won't be fixed in undo-tree for regional undos, until it also
scans forward from (TEXT . POS) as this patch's
undo-make-selective-list does.

> Begs the question: why didn't (don't) we record marker adjustments
> here (and other similar places)?

I considered pursuing that question earlier, but opted for those
callers to behave as before, at least for now.

There's a related comment nearby one of the callers:

/* Note that this does not yet handle markers quite right.
   Also it needs to record a single undo-entry that does a replacement
   rather than a separate delete and insert.
   That way, undo will also handle markers properly.

   But if MARKERS is 0, don't relocate markers.  */

I've attached the updated patch with your comments incorporated. I'll
install soon.

--089e0116019c131fc604f5618167
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">[Adding Toby, since I mention undo-tree.]<br><br>&gt; It w=
ould also be more conservative to keep this unchanged, but I<br>&gt; think =
I agree with you here that we don&#39;t need to be *that*<br>&gt; conservat=
ive.<br>
<br>This is how I addressed that:<br><br>diff --git a/lisp/simple.el b/lisp=
/simple.el<br>index 4a3a89c..6b5031e 100644<br>--- a/lisp/simple.el<br>+++ =
b/lisp/simple.el<br>@@ -2375,6 +2375,10 @@ we stop and ignore all further e=
lements.&quot;<br>
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 ;; This is a &quo=
t;was unmodified&quot; element.<br>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=
=A0=A0=A0=A0=A0=A0 ;; Keep it if we have kept everything thus far.<br>=A0=
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 (not some-rejected))=
<br>+=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 ;; Skip over ma=
rker adjustments, instead relying on<br>
+=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 ;; finding them aft=
er (TEXT . POS) elements<br>+=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=
=A0=A0=A0 ((markerp (car-safe undo-elt))<br>+=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=
=A0=A0=A0=A0=A0=A0=A0=A0=A0 nil)<br>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=
=A0=A0=A0=A0=A0 (t<br>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=
=A0=A0 (undo-elt-in-region undo-elt start end)))))<br>
=A0=A0=A0=A0=A0=A0=A0 (if keep-this<br>@@ -2461,7 +2465,7 @@ marker adjustm=
ent&#39;s corresponding (TEXT . POS) element.&quot;<br>=A0=A0=A0=A0=A0=A0=
=A0=A0=A0=A0=A0=A0=A0 (&lt;=3D (abs (cdr undo-elt)) end)))<br>=A0=A0=A0=A0=
=A0=A0=A0 ((and (consp undo-elt) (markerp (car undo-elt)))<br>
=A0=A0=A0=A0=A0=A0=A0=A0 ;; (MARKER . ADJUSTMENT)<br>-=A0=A0=A0=A0=A0=A0=A0=
=A0 nil)<br>+=A0=A0=A0=A0=A0=A0=A0=A0 (&lt;=3D start (car undo-elt) end))<b=
r>=A0=A0=A0=A0=A0=A0=A0 ((null (car undo-elt))<br>=A0=A0=A0=A0=A0=A0=A0=A0 =
;; (nil PROPERTY VALUE BEG . END)<br>=A0=A0=A0=A0=A0=A0=A0=A0 (let ((tail (=
nthcdr 3 undo-elt)))<br>
<br>It maintains the same return from undo-elt-in-region for marker<br>adju=
stments as before.<br><br>I took a look at undo-tree. It doesn&#39;t use un=
do-make-selective-list,<br>but does use undo-elt-in-region. I guess that me=
ans this particular<br>
bug won&#39;t be fixed in undo-tree for regional undos, until it also<br>sc=
ans forward from (TEXT . POS) as this patch&#39;s<br>undo-make-selective-li=
st does.<br><br>&gt; Begs the question: why didn&#39;t (don&#39;t) we recor=
d marker adjustments<br>
&gt; here (and other similar places)?<br><br>I considered pursuing that que=
stion earlier, but opted for those<br>callers to behave as before, at least=
 for now.<br><br>There&#39;s a related comment nearby one of the callers:<b=
r>
<br>/* Note that this does not yet handle markers quite right.<br>=A0=A0 Al=
so it needs to record a single undo-entry that does a replacement<br>=A0=A0=
 rather than a separate delete and insert.<br>=A0=A0 That way, undo will al=
so handle markers properly.<br>
<br>=A0=A0 But if MARKERS is 0, don&#39;t relocate markers.=A0 */<br><br>I&=
#39;ve attached the updated patch with your comments incorporated. I&#39;ll=
<br>install soon.<br><br></div>

--089e0116019c131fc604f5618167--
--089e0116019c131fcc04f5618169
Content-Type: text/plain; charset=US-ASCII; name="undo-marker-record-20140324.diff"
Content-Disposition: attachment; filename="undo-marker-record-20140324.diff"
Content-Transfer-Encoding: base64
X-Attachment-Id: f_ht6b4c0p0

ZGlmZiAtLWdpdCBhL2RvYy9saXNwcmVmL0NoYW5nZUxvZyBiL2RvYy9saXNwcmVmL0NoYW5nZUxv
ZwppbmRleCA2ZmZkODBiLi43MDRhYTQ4IDEwMDY0NAotLS0gYS9kb2MvbGlzcHJlZi9DaGFuZ2VM
b2cKKysrIGIvZG9jL2xpc3ByZWYvQ2hhbmdlTG9nCkBAIC0xLDMgKzEsMTEgQEAKKzIwMTQtMDMt
MTMgIEJhcnJ5IE8nUmVpbGx5ICA8Z3VuZGFldGlhcG9AZ21haWwuY29tPgorCisJKiBtYXJrZXJz
LnRleGkgKE1vdmluZyBNYXJrZXIgUG9zaXRpb25zKTogVGhlIDIwMTQtMDMtMDIgZG9jCisJY2hh
bmdlIG1lbnRpb25pbmcgdW5kbydzIGluYWJpbGl0eSB0byBoYW5kbGUgcmVsb2NhdGVkIG1hcmtl
cnMgbm8KKwlsb25nZXIgYXBwbGllcy4gIFNlZSBidWcjMTY4MTguCisJKiB0ZXh0LnRleGkgKFVu
ZG8pOiBFeHBhbmQgZG9jdW1lbnRhdGlvbiBvZiAoVEVYVCAuIFBPUykgYW5kCisJKE1BUktFUiAu
IEFESlVTVE1FTlQpIHVuZG8gZWxlbWVudHMuCisKIDIwMTQtMDMtMDkgIE1hcnRpbiBSdWRhbGlj
cyAgPHJ1ZGFsaWNzQGdteC5hdD4KIAogCSogZWxpc3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Gluc2VydCBhZnRlciBtYXJrZXJzLAotICAgICAgICAgICAgIDs7IHNvIHRoYXQgdW5kb2luZyB0
aGUgbWFya2VyIGFkanVzdG1lbnRzCi0gICAgICAgICAgICAgOzsgcHV0IHRoZSBtYXJrZXJzIGJh
Y2sgaW4gdGhlIHJpZ2h0IHBsYWNlLgotICAgICAgICAgICAgIChpbnNlcnQgc3RyaW5nKQotICAg
ICAgICAgICAgIChnb3RvLWNoYXIgcG9zKSkpCisgICAgICAgICAgIChsZXQgKHZhbGlkLW1hcmtl
ci1hZGp1c3RtZW50cykKKyAgICAgICAgICAgICA7OyBDaGVjayB0aGF0IG1hcmtlciBhZGp1c3Rt
ZW50cyB3aGljaCB3ZXJlIHJlY29yZGVkCisgICAgICAgICAgICAgOzsgd2l0aCB0aGUgKFNUUklO
RyAuIFBPUykgcmVjb3JkIGFyZSBzdGlsbCB2YWxpZCwgaWUKKyAgICAgICAgICAgICA7OyB0aGUg
bWFya2VycyBoYXZlbid0IG1vdmVkLiAgV2UgY2hlY2sgdGhlaXIgdmFsaWRpdHkKKyAgICAgICAg
ICAgICA7OyBiZWZvcmUgcmVpbnNlcnRpbmcgdGhlIHN0cmluZyBzbyBhcyB3ZSBkb24ndCBuZWVk
IHRvCisgICAgICAgICAgICAgOzsgbWluZCBtYXJrZXIgaW5zZXJ0aW9uLXR5cGUuCisgICAgICAg
ICAgICAgKHdoaWxlIChhbmQgKG1hcmtlcnAgKGNhci1zYWZlIChjYXIgbGlzdCkpKQorICAgICAg
ICAgICAgICAgICAgICAgICAgIChpbnRlZ2VycCAoY2RyLXNhZmUgKGNhciBsaXN0KSkpKQorICAg
ICAgICAgICAgICAgKGxldCogKChtYXJrZXItYWRqIChwb3AgbGlzdCkpCisgICAgICAgICAgICAg
ICAgICAgICAgKG0gKGNhciBtYXJrZXItYWRqKSkpCisgICAgICAgICAgICAgICAgIChhbmQgKGVx
IChtYXJrZXItYnVmZmVyIG0pIChjdXJyZW50LWJ1ZmZlcikpCisgICAgICAgICAgICAgICAgICAg
ICAgKD0gcG9zIG0pCisgICAgICAgICAgICAgICAgICAgICAgKHB1c2ggbWFya2VyLWFkaiB2YWxp
ZC1tYXJrZXItYWRqdXN0bWVudHMpKSkpCisgICAgICAgICAgICAgOzsgSW5zZXJ0IHN0cmluZyBh
bmQgYWRqdXN0IHBvaW50CisgICAgICAgICAgICAgKGlmICg8IHBvcyAwKQorICAgICAgICAgICAg
ICAgICAocHJvZ24KKyAgICAgICAgICAgICAgICAgICAoZ290by1jaGFyICgtIHBvcykpCisgICAg
ICAgICAgICAgICAgICAgKGluc2VydCBzdHJpbmcpKQorICAgICAgICAgICAgICAgKGdvdG8tY2hh
ciBwb3MpCisgICAgICAgICAgICAgICAoaW5zZXJ0IHN0cmluZykKKyAgICAgICAgICAgICAgIChn
b3RvLWNoYXIgcG9zKSkKKyAgICAgICAgICAgICA7OyBBZGp1c3QgdGhlIHZhbGlkIG1hcmtlciBh
ZGp1c3RtZW50cworICAgICAgICAgICAgIChkb2xpc3QgKGFkaiB2YWxpZC1tYXJrZXItYWRqdXN0
bWVudHMpCisgICAgICAgICAgICAgICAoc2V0LW1hcmtlciAoY2FyIGFkaikKKyAgICAgICAgICAg
ICAgICAgICAgICAgICAgICgtIChjYXIgYWRqKSAoY2RyIGFkaikpKSkpKQogICAgICAgICAgIDs7
IChNQVJLRVIgLiBPRkZTRVQpIG1lYW5zIGEgbWFya2VyIE1BUktFUiB3YXMgYWRqdXN0ZWQgYnkg
T0ZGU0VULgogICAgICAgICAgIChgKCwoYW5kIG1hcmtlciAocHJlZCBtYXJrZXJwKSkgLiAsKGFu
ZCBvZmZzZXQgKHByZWQgaW50ZWdlcnApKSkKLSAgICAgICAgICAgKHdoZW4gKG1hcmtlci1idWZm
ZXIgbWFya2VyKQotICAgICAgICAgICAgIChzZXQtbWFya2VyIG1hcmtlcgotICAgICAgICAgICAg
ICAgICAgICAgICAgICgtIG1hcmtlciBvZmZzZXQpCi0gICAgICAgICAgICAgICAgICAg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bWVudHMKKyAgICAgICAgICAgICAgICAgICAoKG1hcmtlcnAgKGNhci1z
YWZlIHVuZG8tZWx0KSkKKyAgICAgICAgICAgICAgICAgICAgbmlsKQogCQkgICAodAogCQkgICAg
KHVuZG8tZWx0LWluLXJlZ2lvbiB1bmRvLWVsdCBzdGFydCBlbmQpKSkpKQogCShpZiBrZWVwLXRo
aXMKIAkgICAgKHByb2duCiAJICAgICAgKHNldHEgZW5kICgrIGVuZCAoY2RyICh1bmRvLWRlbHRh
IHVuZG8tZWx0KSkpKQogCSAgICAgIDs7IERvbid0IHB1dCB0d28gbmlscyB0b2dldGhlciBpbiB0
aGUgbGlzdAotCSAgICAgIChpZiAobm90IChhbmQgKGVxIChjYXIgdW5kby1saXN0KSBuaWwpCi0J
CQkgICAgKGVxIHVuZG8tZWx0IG5pbCkpKQotCQkgIChzZXRxIHVuZG8tbGlzdCAoY29ucyB1bmRv
LWVsdCB1bmRvLWxpc3QpKSkpCisJICAgICAgKHdoZW4gKG5vdCAoYW5kIChlcSAoY2FyIHVuZG8t
bGlzdCkgbmlsKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGVxIHVuZG8tZWx0IG5p
bCkpKQorICAgICAgICAgICAgICAgIChzZXRxIHVuZG8tbGlzdCAoY29ucyB1bmRvLWVsdCB1bmRv
LWxpc3QpKQorICAgICAgICAgICAgICAgIDs7IElmIChURVhUIC4gUE9TKSwgImtlZXAiIGl0cyBz
dWJzZXF1ZW50IChNQVJLRVIKKyAgICAgICAgICAgICAgICA7OyAuIEFESlVTVE1FTlQpIHdob3Nl
IG1hcmtlcnMgaGF2ZW4ndCBtb3ZlZC4KKyAgICAgICAgICAgICAgICAod2hlbiAoYW5kIChzdHJp
bmdwIChjYXItc2FmZSB1bmRvLWVsdCkpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAoaW50
ZWdlcnAgKGNkci1zYWZlIHVuZG8tZWx0KSkpCisgICAgICAgICAgICAgICAgICAobGV0ICgobGlz
dC1pIChj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SA9IEJVRl9NQVJL
RVJTIChjdXJyZW50X2J1ZmZlcik7IG07IG0gPSBtLT5uZXh0KQorICAgIHsKKyAgICAgIGNoYXJw
b3MgPSBtLT5jaGFycG9zOworICAgICAgZWFzc2VydCAoY2hhcnBvcyA8PSBaKTsKKworICAgICAg
aWYgKGZyb20gPD0gY2hhcnBvcyAmJiBjaGFycG9zIDw9IHRvKQorICAgICAgICB7CisgICAgICAg
ICAgLyogaW5zZXJ0aW9uX3R5cGUgbmlsIG1hcmtlcnMgd2lsbCBlbmQgdXAgYXQgdGhlIGJlZ2lu
bmluZyBvZgorICAgICAgICAgICAgIHRoZSByZS1pbnNlcnRlZCB0ZXh0IGFmdGVyIHVuZG9pbmcg
YSBkZWxldGlvbiwgYW5kIG11c3QgYmUKKyAgICAgICAgICAgICBhZGp1c3RlZCB0byBtb3ZlIHRo
ZW0gdG8gdGhlIGNvcnJlY3QgcGxhY2UuCisKKyAgICAgICAgICAgICBpbnNlcnRpb25fdHlwZSB0
IG1hcmtlcnMgd2lsbCBhdXRvbWF0aWNhbGx5IG1vdmUgZm9yd2FyZAorICAgICAgICAgICAgIHVw
b24gcmUtaW5zZXJ0aW5nIHRoZSBkZWxldGVkIHRleHQsIHNvIHdlIGhhdmUgdG8gYXJyYW5nZQor
ICAgICAgICAgICAgIGZvciB0aGVtIHRvIG1vdmUgYmFja3dhcmQgdG8gdGhlIGNvcnJlY3QgcG9z
aXRpb24uICAqLworICAgICAgICAgIGFkanVzdG1lbnQgPSAobS0+aW5zZXJ0aW9uX3R5cGUgPyB0
byA6IGZyb20pIC0gY2hhcnBvczsKKworICAgICAgICAgIGlmIChhZGp1c3RtZW50KQorICAgICAg
ICAgICAgeworICAgICAgICAgICAgICBYU0VUTUlTQyAobWFya2VyLCBtKTsKKyAgICAgICAgICAg
ICAgYnNldF91bmRvX2xpc3QKKyAgICAgICAgICAgICAgICAoY3VycmVudF9idWZmZXIsCisgICAg
ICAgICAgICAgICAgIEZjb25zIChGY29ucyAob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J1
ZmZlcgorICAgIChidWZmZXItZW5hYmxlLXVuZG8pCisgICAgKGluc2VydCAiYWJjZGVmZyIpCisg
ICAgKHVuZG8tYm91bmRhcnkpCisgICAgKGxldCAoKG0gKG1ha2UtbWFya2VyKSkpCisgICAgICAo
c2V0LW1hcmtlciBtIDIgKGN1cnJlbnQtYnVmZmVyKSkKKyAgICAgIChnb3RvLWNoYXIgKHBvaW50
LW1pbikpCisgICAgICAoZGVsZXRlLWZvcndhcmQtY2hhciAzKQorICAgICAgKHVuZG8tYm91bmRh
cnkpCisgICAgICAoc2hvdWxkICg9IChwb2ludC1taW4pIChtYXJrZXItcG9zaXRpb24gbSkpKQor
ICAgICAgKHVuZG8pCisgICAgICAodW5kby1ib3VuZGFyeSkKKyAgICAgIChzaG91bGQgKD0gMiAo
bWFya2VyLXBvc2l0aW9uIG0pKSkpKSkKKworKGVydC1kZWZ0ZXN0IHVuZG8tdGVzdC1yZWdpb24t
dC1tYXJrZXIgKCkKKyAgIlRlc3QgdW5kbyBpbiByZWdpb24gY29udGFpbmluZyBtYXJrZXIgd2l0
aCB0IGluc2VydGlvbi10eXBlLiIKKyAgKHdpdGgtdGVtcC1idWZmZXIKKyAgICAoYnVmZmVyLWVu
YWJsZS11bmRvKQorICAgICh0cmFuc2llbnQtbWFyay1tb2RlIDEpCisgICAgKGluc2VydCAiYWJj
ZGVmZyIpCisgICAgKHVuZG8tYm91bmRhcnkpCisgICAgKGxldCAoKG0gKG1ha2UtbWFya2VyKSkp
CisgICAgICAoc2V0LW1hcmtlci1pbnNlcnRpb24tdHlwZSBtIHQpCisgICAgICAoc2V0LW1hcmtl
ciBtIChwb2ludC1taW4pIChjdXJyZW50LWJ1ZmZlcikpIDsgbSBhdCBhCisgICAgICAoZ290by1j
aGFyICgrIDIgKHBvaW50LW1pbikpKQorICAgICAgKHB1c2gtbWFyayAocG9pbnQpIHQgdCkKKyAg
ICAgIChzZXRxIG1hcmstYWN0aXZlIHQpCisgICAgICAoZ290by1jaG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SAzKSkKKyAgICAoZGVsZXRlLWZvcndhcmQtY2hhciAxKQorICAgICh1
bmRvLWJvdW5kYXJ5KQorCisgICAgKGluc2VydCAiYmJiIikKKyAgICAodW5kby1ib3VuZGFyeSkK
KworICAgIChnb3RvLWNoYXIgKHBvaW50LW1pbikpCisgICAgKHB1c2gtbWFyayAocG9pbnQpIHQg
dCkKKyAgICAoc2V0cSBtYXJrLWFjdGl2ZSB0KQorICAgIChnb3RvLWNoYXIgKCsgKHBvaW50KSAz
KSkKKyAgICAodW5kbykKKyAgICAodW5kby1ib3VuZGFyeSkKKworICAgIChzaG91bGQgKHN0cmlu
Zz0gKGJ1ZmZlci1zdHJpbmcpICJhYWFGaXJzdCBsaW5lXG5TZWNvbmQgbGluZVxuYmJiIikpKSkK
KwogKGRlZnVuIHVuZG8tdGVzdC1hbGwgKCZvcHRpb25hbCBpbnRlcmFjdGl2ZSkKICAgIlJ1biBh
bGwgdGVzdHMgZm9yIFxcW3VuZG9dLiIKICAgKGludGVyYWN0aXZlICJwIikK
--089e0116019c131fcc04f5618169--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#16818; Package emacs. Full text available.

Message received at 16818 <at> debbugs.gnu.org:


Received: (at 16818) by debbugs.gnu.org; 24 Mar 2014 13:03:55 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Mar 24 09:03:55 2014
Received: from localhost ([127.0.0.1]:46787 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1WS4Xi-0001RL-UT
	for submit <at> debbugs.gnu.org; Mon, 24 Mar 2014 09:03:55 -0400
Received: from chene.dit.umontreal.ca ([132.204.246.20]:54659)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <monnier@HIDDEN>) id 1WS4Xg-0001RB-IS
 for 16818 <at> debbugs.gnu.org; Mon, 24 Mar 2014 09:03:53 -0400
Received: from pastel.home (lechon.iro.umontreal.ca [132.204.27.242])
 by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id s2OD48FZ026700;
 Mon, 24 Mar 2014 09:04:08 -0400
Received: by pastel.home (Postfix, from userid 20848)
 id 4AF55600A2; Mon, 24 Mar 2014 09:03:50 -0400 (EDT)
From: Stefan <monnier@HIDDEN>
To: Barry OReilly <gundaetiapo@HIDDEN>
Subject: Re: bug#16818: Acknowledgement (Undo in region after markers in undo
 history relocated)
Message-ID: <jwv4n2nhirv.fsf-monnier+emacsbugs@HIDDEN>
References: <CAFM41H0EA=TyArGBMEwDWy5nbHsfmN8Ev77P2QrvmbMHifnmAg@HIDDEN>
 <handler.16818.B.13928481719895.ack <at> debbugs.gnu.org>
 <CAFM41H0dB_qCzwQLQ4g86Qwbt8VnvqYru=yf0TPD9UeL6qsUkQ@HIDDEN>
 <jwv1tyyo06q.fsf-monnier+emacsbugs@HIDDEN>
 <CAFM41H2Q-x8L9jPjUNk=9TJoc3mDz2P19UV0bK1RbZ-25nYQZg@HIDDEN>
 <jwvvbw2euon.fsf-monnier+emacsbugs@HIDDEN>
 <CAFM41H0J7GFE2andkrqR7Tdz2Nm4MPXY20sufUeR_OyyitwS=g@HIDDEN>
 <jwvtxb39fia.fsf-monnier+emacsbugs@HIDDEN>
 <CAFM41H3gjuKz4joOw3eLRoNkbJ43Dh37Kvfhocv-zpkLO8BjHg@HIDDEN>
 <jwvk3byz11x.fsf-monnier+emacsbugs@HIDDEN>
 <jwvlhwexjdk.fsf-monnier+emacsbugs@HIDDEN>
 <CAFM41H2fmREiVOm6Vh4KGeRLSLM99cMbsHKdHn_86p_dj=1yLw@HIDDEN>
 <jwva9co2xs4.fsf-monnier+emacsbugs@HIDDEN>
 <CAFM41H19PB=Ej2-Wx8Y-ZrGEDz=uptnxQx8yHxb2g444RP6V5w@HIDDEN>
 <jwvmwgmxbp0.fsf-monnier+emacsbugs@HIDDEN>
 <CAFM41H3fhb+adrtWfcSrimAcO+79tDqJbJFOA=HtLbAaX183cQ@HIDDEN>
Date: Mon, 24 Mar 2014 09:03:50 -0400
In-Reply-To: <CAFM41H3fhb+adrtWfcSrimAcO+79tDqJbJFOA=HtLbAaX183cQ@HIDDEN>
 (Barry OReilly's message of "Sun, 23 Mar 2014 18:49:32 -0400")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-NAI-Spam-Flag: NO
X-NAI-Spam-Level: 
X-NAI-Spam-Threshold: 5
X-NAI-Spam-Score: 0.2
X-NAI-Spam-Rules: 2 Rules triggered
	NOFROM_SGMAIL=0.2, RV4891=0
X-NAI-Spam-Version: 2.3.0.9362 : core <4891> : inlines <634> : streams
 <1143843> : uri <1708516>
X-Spam-Score: -1.9 (-)
X-Debbugs-Envelope-To: 16818
Cc: 16818 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.9 (-)

> Attached is the new patch to solve this, implementing option 2 and
> incorporating your feedback.

Looks good, thank you very much.  Feel free to install into emacs-24,
but please see my comments below.


        Stefan


> +2014-03-13  Barry O'Reilly  <gundaetiapo@HIDDEN>
> +	* markers.texi (Moving Marker Positions): The 2014-03-02 doc

Missing empty line between the two.

> +             (while (and (consp (car list))
> +                         (markerp (caar list))

(markerp (car-safe (car list)))

> +               (and (eq (marker-buffer (caar list))
> +                        (current-buffer))
> +                    (integerp (marker-position (caar list)))

I think this `integerp' test is redundant (marker-position can only
return nil or an integer and if it returns nil, then marker-buffer also
returns nil).

>            ;; (MARKER . OFFSET) means a marker MARKER was adjusted by OFFSET.
>            (`(,(and marker (pred markerp)) . ,(and offset (pred integerp)))
> -           (when (marker-buffer marker)
> -             (set-marker marker
> -                         (- marker offset)
> -                         (marker-buffer marker))))
> +           (warn "Encountered %S entry in undo list with no matching (TEXT . POS) entry"
> +                 next))

I think I'd add the warning without removing the `set-marker', just to
be conservative.

> +                (when (and (consp undo-elt)
> +                           (stringp (car undo-elt))

(stringp (car-safe undo-elt))

> +                           (integerp (cdr undo-elt)))
> +                  (let ((list-i (cdr undo-list-copy)))
> +                    (while (markerp (caar list-i))

I think you need (markerp (car-safe (car list-i))) because (car list-i)
may be an integer.

Also, I'd try to avoid repeatedly calling (car list-i) in the body of
the `while' loop(s) by let-binding it.  I'd probably do it via `pop', as
in

  (while (...)
    (let ((elem (pop undo-list)))
      ...))

>  	((and (consp undo-elt) (markerp (car undo-elt)))
> -	 ;; This is a marker-adjustment element (MARKER . ADJUSTMENT).
> -	 ;; See if MARKER is inside the region.
> -	 (let ((alist-elt (assq (car undo-elt) undo-adjusted-markers)))
> -	   (unless alist-elt
> -	     (setq alist-elt (cons (car undo-elt)
> -				   (marker-position (car undo-elt))))
> -	     (setq undo-adjusted-markers
> -		   (cons alist-elt undo-adjusted-markers)))
> -	   (and (cdr alist-elt)
> -		(>= (cdr alist-elt) start)
> -		(<= (cdr alist-elt) end))))
> +	 ;; (MARKER . ADJUSTMENT)
> +         nil)

It would also be more conservative to keep this unchanged, but I think
I agree with you here that we don't need to be *that* conservative.

> -  record_delete (beg, make_buffer_string (beg, beg + length, 1));
> +  record_delete (beg, make_buffer_string (beg, beg + length, 1), false);

Begs the question: why didn't (don't) we record marker adjustments here
(and other similar places)?


        Stefan




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#16818; Package emacs. Full text available.

Message received at 16818 <at> debbugs.gnu.org:


Received: (at 16818) by debbugs.gnu.org; 23 Mar 2014 22:49:42 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Mar 23 18:49:42 2014
Received: from localhost ([127.0.0.1]:46363 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1WRrD2-0005A6-FH
	for submit <at> debbugs.gnu.org; Sun, 23 Mar 2014 18:49:42 -0400
Received: from mail-oa0-f50.google.com ([209.85.219.50]:44516)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <gundaetiapo@HIDDEN>) id 1WRrCv-00059q-Ak
 for 16818 <at> debbugs.gnu.org; Sun, 23 Mar 2014 18:49:35 -0400
Received: by mail-oa0-f50.google.com with SMTP id i7so4956608oag.23
 for <16818 <at> debbugs.gnu.org>; Sun, 23 Mar 2014 15:49:32 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=mime-version:in-reply-to:references:date:message-id:subject:from:to
 :cc:content-type;
 bh=jTtj1HBtSl4GZ/QU+xEGmNoiInpVXWoUdPHjPARhfCo=;
 b=B02XqLEoCn15GzYq+326nNFXNYFjyaDS6lnYWpJUVjGRvWJFZ68eB5k3Osem1jvRyo
 LQG8tI8N6t2EnsLdjh0xW37lkC08fTEtPSRnQVYa88Yv7d+DW0vD26OkCcwHXOZAzK8Y
 UdMJJDLgclQ1WABNr9W+wlY9IFVhG/DxtG1QIR0jUv0eBrSzuBajuM3ojCyimaythGEV
 fbk9zxsxOpFFLzSOv4BMCg1VCG+I6uImXlHTrMYXLjwQ7crl2e3e5Ui01g+iXMe1KY+B
 a2QkYtYarrAJMlSw2p6JMtTDtJmuhwHxew3/QzKrVKzJgCglvo8BVi53JhG0qonnrp2K
 SK9g==
MIME-Version: 1.0
X-Received: by 10.182.153.226 with SMTP id vj2mr23842068obb.26.1395614972454; 
 Sun, 23 Mar 2014 15:49:32 -0700 (PDT)
Received: by 10.76.6.44 with HTTP; Sun, 23 Mar 2014 15:49:32 -0700 (PDT)
In-Reply-To: <jwvmwgmxbp0.fsf-monnier+emacsbugs@HIDDEN>
References: <CAFM41H0EA=TyArGBMEwDWy5nbHsfmN8Ev77P2QrvmbMHifnmAg@HIDDEN>
 <handler.16818.B.13928481719895.ack <at> debbugs.gnu.org>
 <CAFM41H0dB_qCzwQLQ4g86Qwbt8VnvqYru=yf0TPD9UeL6qsUkQ@HIDDEN>
 <jwv1tyyo06q.fsf-monnier+emacsbugs@HIDDEN>
 <CAFM41H2Q-x8L9jPjUNk=9TJoc3mDz2P19UV0bK1RbZ-25nYQZg@HIDDEN>
 <jwvvbw2euon.fsf-monnier+emacsbugs@HIDDEN>
 <CAFM41H0J7GFE2andkrqR7Tdz2Nm4MPXY20sufUeR_OyyitwS=g@HIDDEN>
 <jwvtxb39fia.fsf-monnier+emacsbugs@HIDDEN>
 <CAFM41H3gjuKz4joOw3eLRoNkbJ43Dh37Kvfhocv-zpkLO8BjHg@HIDDEN>
 <jwvk3byz11x.fsf-monnier+emacsbugs@HIDDEN>
 <jwvlhwexjdk.fsf-monnier+emacsbugs@HIDDEN>
 <CAFM41H2fmREiVOm6Vh4KGeRLSLM99cMbsHKdHn_86p_dj=1yLw@HIDDEN>
 <jwva9co2xs4.fsf-monnier+emacsbugs@HIDDEN>
 <CAFM41H19PB=Ej2-Wx8Y-ZrGEDz=uptnxQx8yHxb2g444RP6V5w@HIDDEN>
 <jwvmwgmxbp0.fsf-monnier+emacsbugs@HIDDEN>
Date: Sun, 23 Mar 2014 18:49:32 -0400
Message-ID: <CAFM41H3fhb+adrtWfcSrimAcO+79tDqJbJFOA=HtLbAaX183cQ@HIDDEN>
Subject: Re: bug#16818: Acknowledgement (Undo in region after markers in undo
 history relocated)
From: Barry OReilly <gundaetiapo@HIDDEN>
To: Stefan <monnier@HIDDEN>
Content-Type: multipart/mixed; boundary=089e013d0dc0ae3ddc04f54dee75
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 16818
Cc: 16818 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

--089e013d0dc0ae3ddc04f54dee75
Content-Type: multipart/alternative; boundary=089e013d0dc0ae3dd804f54dee73

--089e013d0dc0ae3dd804f54dee73
Content-Type: text/plain; charset=ISO-8859-1

>>   Value: (nil
>>    (#("   " 0 3
>>       (fontified t))
>>     . 12)
>>    (#<marker at 12 in foo.py> . -2)
>>    (#<marker at 12 in foo.py> . -2)
>>    (#<marker in no buffer> . -3)
>>    (#<marker in no buffer> . -2)
>>    (t 20985 26927 0 0))

> Oh, right. That would be good as well. At least as good as option 1.
> So I'd go with whichever of option 1 or 2 is simpler.

Attached is the new patch to solve this, implementing option 2 and
incorporating your feedback.

--089e013d0dc0ae3dd804f54dee73
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">&gt;&gt;=A0=A0 Value: (nil<br>&gt;&gt;=A0=A0=A0 (#(&quot;=
=A0=A0 &quot; 0 3<br>&gt;&gt;=A0=A0=A0=A0=A0=A0 (fontified t))<br>&gt;&gt;=
=A0=A0=A0=A0 . 12)<br>&gt;&gt;=A0=A0=A0 (#&lt;marker at 12 in foo.py&gt; . =
-2)<br>&gt;&gt;=A0=A0=A0 (#&lt;marker at 12 in foo.py&gt; . -2)<br>
&gt;&gt;=A0=A0=A0 (#&lt;marker in no buffer&gt; . -3)<br>&gt;&gt;=A0=A0=A0 =
(#&lt;marker in no buffer&gt; . -2)<br>&gt;&gt;=A0=A0=A0 (t 20985 26927 0 0=
))<br><br>&gt; Oh, right. That would be good as well. At least as good as o=
ption 1.<br>&gt; So I&#39;d go with whichever of option 1 or 2 is simpler.<=
br>
<br>Attached is the new patch to solve this, implementing option 2 and<br>i=
ncorporating your feedback.<br><br></div>

--089e013d0dc0ae3dd804f54dee73--
--089e013d0dc0ae3ddc04f54dee75
Content-Type: text/plain; charset=US-ASCII; name="undo-marker-record.diff"
Content-Disposition: attachment; filename="undo-marker-record.diff"
Content-Transfer-Encoding: base64
X-Attachment-Id: f_ht4x3esd0

ZGlmZiAtLWdpdCBhL2RvYy9saXNwcmVmL0NoYW5nZUxvZyBiL2RvYy9saXNwcmVmL0NoYW5nZUxv
ZwppbmRleCA2ZmZkODBiLi43NGE3NTZlIDEwMDY0NAotLS0gYS9kb2MvbGlzcHJlZi9DaGFuZ2VM
b2cKKysrIGIvZG9jL2xpc3ByZWYvQ2hhbmdlTG9nCkBAIC0xLDMgKzEsMTAgQEAKKzIwMTQtMDMt
MTMgIEJhcnJ5IE8nUmVpbGx5ICA8Z3VuZGFldGlhcG9AZ21haWwuY29tPgorCSogbWFya2Vycy50
ZXhpIChNb3ZpbmcgTWFya2VyIFBvc2l0aW9ucyk6IFRoZSAyMDE0LTAzLTAyIGRvYworCWNoYW5n
ZSBtZW50aW9uaW5nIHVuZG8ncyBpbmFiaWxpdHkgd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AgICAgICAgIDs7IENo
ZWNrIHRoYXQgbWFya2VyIGFkanVzdG1lbnRzIHdoaWNoIHdlcmUgcmVjb3JkZWQKKyAgICAgICAg
ICAgICA7OyB3aXRoIHRoZSAoU1RSSU5HIC4gUE9TKSByZWNvcmQgYXJlIHN0aWxsIHZhbGlkLCBp
ZQorICAgICAgICAgICAgIDs7IHRoZSBtYXJrZXJzIGhhdmVuJ3QgbW92ZWQuICBXZSBjaGVjayB0
aGVpciB2YWxpZGl0eQorICAgICAgICAgICAgIDs7IGJlZm9yZSByZWluc2VydGluZyB0aGUgc3Ry
aW5nIHNvIGFzIHdlIGRvbid0IG5lZWQgdG8KKyAgICAgICAgICAgICA7OyBtaW5kIG1hcmtlciBp
bnNlcnRpb24tdHlwZS4KKyAgICAgICAgICAgICAod2hpbGUgKGFuZCAoY29uc3AgKGNhciBsaXN0
KSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAobWFya2VycCAoY2FhciBsaXN0KSkKKyAgICAg
ICAgICAgICAgICAgICAgICAgICAoaW50ZWdlcnAgKGNkYXIgbGlzdCkpKQorICAgICAgICAgICAg
ICAgKGFuZCAoZXEgKG1hcmtlci1idWZmZXIgKGNhYXIgbGlzdCkpCisgICAgICAgICAgICAgICAg
ICAgICAgICAoY3VycmVudC1idWZmZXIpKQorICAgICAgICAgICAgICAgICAgICAoaW50ZWdlcnAg
KG1hcmtlci1wb3NpdGlvbiAoY2FhciBsaXN0KSkpCisgICAgICAgICAgICAgICAgICAgICg9IHBv
cyAoY2FhciBsaXN0KSkKKyAgICAgICAgICAgICAgICAgICAgKHB1c2ggKGNhciBsaXN0KSB2YWxp
ZC1tYXJrZXItYWRqdXN0bWVudHMpKQorICAgICAgICAgICAgICAgKHBvcCBsaXN0KSkKKyAgICAg
ICAgICAgICA7OyBJbnNlcnQgc3RyaW5nIGFuZCBhZGp1c3QgcG9pbnQKICAgICAgICAgICAgKGlm
ICg8IHBvcyAwKQogICAgICAgICAgICAgICAgKHByb2duCiAgICAgICAgICAgICAgICAgIChnb3Rv
LWNoYXIgKC0gcG9zKSkKICAgICAgICAgICAgICAgICAgKGluc2VydCBzdHJpbmcpKQogICAgICAg
ICAgICAgIChnb3RvLWNoYXIgcG9zKQotICAgICAgICAgICAgIDs7IE5vdyB0aGF0IHdlIHJlY29y
ZCBtYXJrZXIgYWRqdXN0bWVudHMKLSAgICAgICAgICAgICA7OyAoY2F1c2VkIGJ5IGRlbGV0aW9u
KSBmb3IgdW5kbywKLSAgICAgICAgICAgICA7OyB3ZSBzaG91bGQgYWx3YXlzIGluc2VydCBhZnRl
ciBtYXJrZXJzLAotICAgICAgICAgICAgIDs7IHNvIHRoYXQgdW5kb2luZyB0aGUgbWFya2VyIGFk
anVzdG1lbnRzCi0gICAgICAgICAgICAgOzsgcHV0IHRoZSBtYXJrZXJzIGJhY2sgaW4gdGhlIHJp
Z2h0IHBsYWNlLgogICAgICAgICAgICAgIChpbnNlcnQgc3RyaW5nKQotICAgICAgICAgICAgIChn
b3RvLWNoYXIgcG9zKSkpCisgICAgICAgICAgICAgICAoZ290by1jaGFyIHBvcykpCisgICAgICAg
ICAgICAgOzsgQWRqdXN0IHRoZSB2YWxpZCBtYXJrZXIgYWRqdXN0bWVudHMKKyAgICAgICAgICAg
ICAoZG9saXN0IChhZGogdmFsaWQtbWFya2VyLWFkanVzdG1lbnRzKQorICAgICAgICAgICAgICAg
KHNldC1tYXJrZXIgKGNhciBhZGopCisgICAgICAgICAgICAgICAgICAgICAgICAgICAoLSAoY2Fy
IGFkaikgKGNkciBhZGopKSkpKSkKICAgICAgICAgICA7OyAoTUFSS0VSIC4gT0ZGU0VUKSBtZWFu
cyBhIG1hcmtlciBNQVJLRVIgd2FzIGFkanVzdGVkIGJ5IE9GRlNFVC4KICAgICAgICAgICAoYCgs
KGFuZCBtYXJrZXIgKHByZWQgbWFya2VycCkpIC4gLChhbmQgb2Zmc2V0IChwcmVkIGludGVnZXJw
KSkpCi0gICAgICAgICAgICh3aGVuIChtYXJr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QURKVVNU
TUVOVCkgd2hvc2UgbWFya2VycyBoYXZlbid0IG1vdmVkLgorICAgICAgICAgICAgICAgICh3aGVu
IChhbmQgKGNvbnNwIHVuZG8tZWx0KQorICAgICAgICAgICAgICAgICAgICAgICAgICAgKHN0cmlu
Z3AgKGNhciB1bmRvLWVsdCkpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAoaW50ZWdlcnAg
KGNkciB1bmRvLWVsdCkpKQorICAgICAgICAgICAgICAgICAgKGxldCAoKGxpc3QtaSAoY2RyIHVu
ZG8tbGlzdC1jb3B5KSkpCisgICAgICAgICAgICAgICAgICAgICh3aGlsZSAobWFya2VycCAoY2Fh
ciBsaXN0LWkpKQorICAgICAgICAgICAgICAgICAgICAgIChhbmQgKGVxIChtYXJrZXItYnVmZmVy
IChjYWFyIGxpc3QtaSkpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGN1cnJlbnQt
YnVmZmVyKSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgIChpbnRlZ2VycCAobWFya2VyLXBv
c2l0aW9uIChjYWFyIGxpc3QtaSkpKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgKD0gKGNk
ciB1bmRvLWVsdCkgKGNhYXIgbGlzdC1pKSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgIChw
dXNoIChjYXIgbGlzdC1pKSB1bmRvLWxpc3QpKQorICAgICAgICAgICAgICAgICAgICAgIChwb3Ag
bGlzdC1pKSkpKSkpCiAJICAoaWYgKHVuZG8tZWx0LWNyb3NzZXMtcmVnaW9uIHVuZG8tZWx0IHN0
YXJ0IGVuZCkKIAkgICAgICAoc2V0cSB1bmRvLWxpc3QtY29weSBuaWwpCiAJICAgIChzZXRxIHNv
bWUtcmVqZWN0ZWQgdCkKQEAgLTI0MTcsNyArMjQ0MCwxMiBAQCB3ZSBzdG9wIGFuZCBpZ25vcmUg
YWxsIGZ1cnRoZXIgZWxlbWVudHMuIgogCiAoZGVmdW4gdW5kby1lbHQt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mRhcnkpCisKKyAgICAoZ290by1jaGFyIChwb2lu
dC1taW4pKQorICAgIChpbnNlcnQgImFhYSIpCisgICAgKHVuZG8tYm91bmRhcnkpCisKKyAgICAo
dW5kbykKKyAgICAodW5kby1ib3VuZGFyeSkKKworICAgIChnb3RvLWNoYXIgKHBvaW50LW1heCkp
CisgICAgKGluc2VydCAiYmJiIikKKyAgICAodW5kby1ib3VuZGFyeSkKKworICAgIChwdXNoLW1h
cmsgKHBvaW50KSB0IHQpCisgICAgKHNldHEgbWFyay1hY3RpdmUgdCkKKyAgICAoZ290by1jaGFy
ICgtIChwb2ludCkgMykpCisgICAgKGRlbGV0ZS1mb3J3YXJkLWNoYXIgMSkKKyAgICAodW5kby1i
b3VuZGFyeSkKKworICAgIChpbnNlcnQgImJiYiIpCisgICAgKHVuZG8tYm91bmRhcnkpCisKKyAg
ICAoZ290by1jaGFyIChwb2ludC1taW4pKQorICAgIChwdXNoLW1hcmsgKHBvaW50KSB0IHQpCisg
ICAgKHNldHEgbWFyay1hY3RpdmUgdCkKKyAgICAoZ290by1jaGFyICgrIChwb2ludCkgMykpCisg
ICAgKHVuZG8pCisgICAgKHVuZG8tYm91bmRhcnkpCisKKyAgICAoc2hvdWxkIChzdHJpbmc9IChi
dWZmZXItc3RyaW5nKSAiYWFhRmlyc3QgbGluZVxuU2Vjb25kIGxpbmVcbmJiYiIpKSkpCisKIChk
ZWZ1biB1bmRvLXRlc3QtYWxsICgmb3B0aW9uYWwgaW50ZXJhY3RpdmUpCiAgICJSdW4gYWxsIHRl
c3RzIGZvciBcXFt1bmRvXS4iCiAgIChpbnRlcmFjdGl2ZSAicCIpCg==
--089e013d0dc0ae3ddc04f54dee75--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#16818; Package emacs. Full text available.

Message received at 16818 <at> debbugs.gnu.org:


Received: (at 16818) by debbugs.gnu.org; 19 Mar 2014 18:56:36 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Mar 19 14:56:36 2014
Received: from localhost ([127.0.0.1]:41555 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1WQLfH-0005H6-IJ
	for submit <at> debbugs.gnu.org; Wed, 19 Mar 2014 14:56:35 -0400
Received: from ironport2-out.teksavvy.com ([206.248.154.181]:13595)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <monnier@HIDDEN>) id 1WQLfE-0005Gu-TY
 for 16818 <at> debbugs.gnu.org; Wed, 19 Mar 2014 14:56:33 -0400
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: Av4EABK/CFHO+KKg/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLNBIUGA0kiB4GwS2RCgOOGJZigV6DEw
X-IPAS-Result: Av4EABK/CFHO+KKg/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLNBIUGA0kiB4GwS2RCgOOGJZigV6DEw
X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="52640462"
Received: from 206-248-162-160.dsl.teksavvy.com (HELO pastel.home)
 ([206.248.162.160])
 by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA;
 19 Mar 2014 14:56:32 -0400
Received: by pastel.home (Postfix, from userid 20848)
 id 1D71660123; Wed, 19 Mar 2014 14:56:32 -0400 (EDT)
From: Stefan <monnier@HIDDEN>
To: Barry OReilly <gundaetiapo@HIDDEN>
Subject: Re: bug#16818: Acknowledgement (Undo in region after markers in undo
 history relocated)
Message-ID: <jwvmwgmxbp0.fsf-monnier+emacsbugs@HIDDEN>
References: <CAFM41H0EA=TyArGBMEwDWy5nbHsfmN8Ev77P2QrvmbMHifnmAg@HIDDEN>
 <handler.16818.B.13928481719895.ack <at> debbugs.gnu.org>
 <CAFM41H0dB_qCzwQLQ4g86Qwbt8VnvqYru=yf0TPD9UeL6qsUkQ@HIDDEN>
 <jwv1tyyo06q.fsf-monnier+emacsbugs@HIDDEN>
 <CAFM41H2Q-x8L9jPjUNk=9TJoc3mDz2P19UV0bK1RbZ-25nYQZg@HIDDEN>
 <jwvvbw2euon.fsf-monnier+emacsbugs@HIDDEN>
 <CAFM41H0J7GFE2andkrqR7Tdz2Nm4MPXY20sufUeR_OyyitwS=g@HIDDEN>
 <jwvtxb39fia.fsf-monnier+emacsbugs@HIDDEN>
 <CAFM41H3gjuKz4joOw3eLRoNkbJ43Dh37Kvfhocv-zpkLO8BjHg@HIDDEN>
 <jwvk3byz11x.fsf-monnier+emacsbugs@HIDDEN>
 <jwvlhwexjdk.fsf-monnier+emacsbugs@HIDDEN>
 <CAFM41H2fmREiVOm6Vh4KGeRLSLM99cMbsHKdHn_86p_dj=1yLw@HIDDEN>
 <jwva9co2xs4.fsf-monnier+emacsbugs@HIDDEN>
 <CAFM41H19PB=Ej2-Wx8Y-ZrGEDz=uptnxQx8yHxb2g444RP6V5w@HIDDEN>
Date: Wed, 19 Mar 2014 14:56:32 -0400
In-Reply-To: <CAFM41H19PB=Ej2-Wx8Y-ZrGEDz=uptnxQx8yHxb2g444RP6V5w@HIDDEN>
 (Barry OReilly's message of "Wed, 19 Mar 2014 09:45:59 -0400")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.3 (/)
X-Debbugs-Envelope-To: 16818
Cc: 16818 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.3 (/)

> I meant "chronologically" before, not "before" in the list. I think
> the desired ordering would be:

>   Value: (nil
>    (#("   " 0 3
>       (fontified t))
>     . 12)
>    (#<marker at 12 in foo.py> . -2)
>    (#<marker at 12 in foo.py> . -2)
>    (#<marker in no buffer> . -3)
>    (#<marker in no buffer> . -2)
>    (t 20985 26927 0 0))

Oh, right.  That would be good as well.  At least as good as option 1.
So I'd go with whichever of option 1 or 2 is simpler.

> * Revisit the approach of fixing markers that move to unrelated
>   locations.

Definitely not for 24.4.


        Stefan




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#16818; Package emacs. Full text available.

Message received at 16818 <at> debbugs.gnu.org:


Received: (at 16818) by debbugs.gnu.org; 19 Mar 2014 18:52:44 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Mar 19 14:52:44 2014
Received: from localhost ([127.0.0.1]:41550 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1WQLbX-00059l-Lg
	for submit <at> debbugs.gnu.org; Wed, 19 Mar 2014 14:52:44 -0400
Received: from ironport2-out.teksavvy.com ([206.248.154.181]:40168)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <monnier@HIDDEN>) id 1WQLbV-00059d-G0
 for 16818 <at> debbugs.gnu.org; Wed, 19 Mar 2014 14:52:41 -0400
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: Av4EABK/CFHO+KKg/2dsb2JhbABEvw4Xc4IeAQEEAVYjEAs0EhQYDSSIHgbBLY0Ng30DjhiWYoFegxOBSg
X-IPAS-Result: Av4EABK/CFHO+KKg/2dsb2JhbABEvw4Xc4IeAQEEAVYjEAs0EhQYDSSIHgbBLY0Ng30DjhiWYoFegxOBSg
X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="52639784"
Received: from 206-248-162-160.dsl.teksavvy.com (HELO pastel.home)
 ([206.248.162.160])
 by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA;
 19 Mar 2014 14:52:40 -0400
Received: by pastel.home (Postfix, from userid 20848)
 id AE0FB60123; Wed, 19 Mar 2014 14:52:40 -0400 (EDT)
From: Stefan <monnier@HIDDEN>
To: Barry OReilly <gundaetiapo@HIDDEN>
Subject: Re: bug#16818: Acknowledgement (Undo in region after markers in undo
 history relocated)
Message-ID: <jwvsiqexbyg.fsf-monnier+emacsbugs@HIDDEN>
References: <CAFM41H0EA=TyArGBMEwDWy5nbHsfmN8Ev77P2QrvmbMHifnmAg@HIDDEN>
 <handler.16818.B.13928481719895.ack <at> debbugs.gnu.org>
 <CAFM41H0dB_qCzwQLQ4g86Qwbt8VnvqYru=yf0TPD9UeL6qsUkQ@HIDDEN>
 <jwv1tyyo06q.fsf-monnier+emacsbugs@HIDDEN>
 <CAFM41H2Q-x8L9jPjUNk=9TJoc3mDz2P19UV0bK1RbZ-25nYQZg@HIDDEN>
 <jwvvbw2euon.fsf-monnier+emacsbugs@HIDDEN>
 <CAFM41H0J7GFE2andkrqR7Tdz2Nm4MPXY20sufUeR_OyyitwS=g@HIDDEN>
 <jwvtxb39fia.fsf-monnier+emacsbugs@HIDDEN>
 <CAFM41H3gjuKz4joOw3eLRoNkbJ43Dh37Kvfhocv-zpkLO8BjHg@HIDDEN>
 <jwvk3byz11x.fsf-monnier+emacsbugs@HIDDEN>
 <jwvlhwexjdk.fsf-monnier+emacsbugs@HIDDEN>
 <CAFM41H2fmREiVOm6Vh4KGeRLSLM99cMbsHKdHn_86p_dj=1yLw@HIDDEN>
 <jwva9co2xs4.fsf-monnier+emacsbugs@HIDDEN>
 <CAFM41H3iBfFjvS2KR-dQso0ST_9A3=5GLghC3-=KEV76hBJkFQ@HIDDEN>
Date: Wed, 19 Mar 2014 14:52:40 -0400
In-Reply-To: <CAFM41H3iBfFjvS2KR-dQso0ST_9A3=5GLghC3-=KEV76hBJkFQ@HIDDEN>
 (Barry OReilly's message of "Wed, 19 Mar 2014 09:36:17 -0400")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.3 (/)
X-Debbugs-Envelope-To: 16818
Cc: 16818 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.3 (/)

>> I'd have the same comment here, but if we emit a warning for sole
>> marker-adjustments in the "non-region" code, we don't really have to
>> worry about them here.
> If you're saying changes under undo-make-selective-list are not
> necessary, remember that currently it can create a list like:

No, I mean that it's OK to *assume* that any marker-adjustment we find
in the undo-region code is "right after a deletion".  Of course, that's
only relevant if that can help us simplify the code.

>> I think we should only change the entry corresponding to a deletion
>> such that it directly handles all the immediately following
>> marker-adjustments
> They don't always immediately follow. An integer record can be between
> them. For example, at the end of the undo-test-marker-adjustment-moved
> test I posted previously, buffer-undo-list is:
>   (nil (1 . 4) nil (abc . 1) 12 (#<marker at 7 in  *temp*-216909> . -1) nil
> (1 . 12) (t . 0))

Right, the integer record is indeed also added by the deletion, so
we should still consider the marker adjustments to "immediately follow".

>   * Implement your proposal but skip over the (t ...) and integer
>     records
>   * Restructure the C code so as marker adjustments are always
>     immediately before deletion records
>   * Revisit the approach of fixing markers that move to unrelated
>     locations.

I think the first option is best (hopefully, the set of "things that can
come between the deletion and the marker adjustments" won't keep growing).


        Stefan




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#16818; Package emacs. Full text available.

Message received at 16818 <at> debbugs.gnu.org:


Received: (at 16818) by debbugs.gnu.org; 19 Mar 2014 13:46:02 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Mar 19 09:46:02 2014
Received: from localhost ([127.0.0.1]:40863 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1WQGoj-00046i-VR
	for submit <at> debbugs.gnu.org; Wed, 19 Mar 2014 09:46:02 -0400
Received: from mail-ob0-f169.google.com ([209.85.214.169]:56244)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <gundaetiapo@HIDDEN>) id 1WQGoi-00046H-Fi
 for 16818 <at> debbugs.gnu.org; Wed, 19 Mar 2014 09:46:01 -0400
Received: by mail-ob0-f169.google.com with SMTP id va2so8213560obc.0
 for <16818 <at> debbugs.gnu.org>; Wed, 19 Mar 2014 06:45:59 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=mime-version:in-reply-to:references:date:message-id:subject:from:to
 :cc:content-type;
 bh=tcA/Uv5Wnf8DlWypqizCSWO6Oi1utzkdO3Bx7eNfDM0=;
 b=IXvGnid0QPV+YwJWJcpkumTIgNsU4VN5xUlXkZk0b5X5mHYg5QOLL/VWKZMm0LnZbQ
 WTI926ZNkGAvw3NR4ElopuxxhLIzMMmsaLNcmDwCJ7HrODagdylMpLNPqNnl3ck33E6/
 XI3Xeo1+V5iJivh49gcOgutDTUuM48nVljz7iHbxVkRFSqCDSeURqNRQrGvnRwOfaRAn
 W1ak4VNdT75LS/Vf6ccZbcacy3HYvdtZrnuq6npe1SFGaAvCRoRgpZ26xOxzOinE78Fe
 g+O+t5ZXHxSx97bYKWZo69safNLhtcQ0ekCq3RaII0FrBocAHMvZIDWPY7JmUCnB76WT
 oWNw==
MIME-Version: 1.0
X-Received: by 10.60.142.229 with SMTP id rz5mr32515661oeb.1.1395236759724;
 Wed, 19 Mar 2014 06:45:59 -0700 (PDT)
Received: by 10.76.6.44 with HTTP; Wed, 19 Mar 2014 06:45:59 -0700 (PDT)
In-Reply-To: <jwva9co2xs4.fsf-monnier+emacsbugs@HIDDEN>
References: <CAFM41H0EA=TyArGBMEwDWy5nbHsfmN8Ev77P2QrvmbMHifnmAg@HIDDEN>
 <handler.16818.B.13928481719895.ack <at> debbugs.gnu.org>
 <CAFM41H0dB_qCzwQLQ4g86Qwbt8VnvqYru=yf0TPD9UeL6qsUkQ@HIDDEN>
 <jwv1tyyo06q.fsf-monnier+emacsbugs@HIDDEN>
 <CAFM41H2Q-x8L9jPjUNk=9TJoc3mDz2P19UV0bK1RbZ-25nYQZg@HIDDEN>
 <jwvvbw2euon.fsf-monnier+emacsbugs@HIDDEN>
 <CAFM41H0J7GFE2andkrqR7Tdz2Nm4MPXY20sufUeR_OyyitwS=g@HIDDEN>
 <jwvtxb39fia.fsf-monnier+emacsbugs@HIDDEN>
 <CAFM41H3gjuKz4joOw3eLRoNkbJ43Dh37Kvfhocv-zpkLO8BjHg@HIDDEN>
 <jwvk3byz11x.fsf-monnier+emacsbugs@HIDDEN>
 <jwvlhwexjdk.fsf-monnier+emacsbugs@HIDDEN>
 <CAFM41H2fmREiVOm6Vh4KGeRLSLM99cMbsHKdHn_86p_dj=1yLw@HIDDEN>
 <jwva9co2xs4.fsf-monnier+emacsbugs@HIDDEN>
Date: Wed, 19 Mar 2014 09:45:59 -0400
Message-ID: <CAFM41H19PB=Ej2-Wx8Y-ZrGEDz=uptnxQx8yHxb2g444RP6V5w@HIDDEN>
Subject: Re: bug#16818: Acknowledgement (Undo in region after markers in undo
 history relocated)
From: Barry OReilly <gundaetiapo@HIDDEN>
To: Stefan <monnier@HIDDEN>
Content-Type: multipart/alternative; boundary=047d7b414e6070e76c04f4f5df5c
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 16818
Cc: 16818 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

--047d7b414e6070e76c04f4f5df5c
Content-Type: text/plain; charset=ISO-8859-1

Clarifications:

>  * Implement your proposal but skip over the (t ...) and integer
    records

I mean "skip" only for the "look ahead to validate" part. Not to skip
completely.

>   * Restructure the C code so as marker adjustments are always
    immediately before deletion records

I meant "chronologically" before, not "before" in the list. I think
the desired ordering would be:

  Value: (nil
   (#("   " 0 3
      (fontified t))
    . 12)
   (#<marker at 12 in foo.py> . -2)
   (#<marker at 12 in foo.py> . -2)
   (#<marker in no buffer> . -3)
   (#<marker in no buffer> . -2)
   (t 20985 26927 0 0))

--047d7b414e6070e76c04f4f5df5c
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Clarifications:<br><br>&gt;&nbsp; &bull; Implement your pr=
oposal but skip over the (t ...) and integer<br>&nbsp;&nbsp;&nbsp; records<=
br><br>I mean &quot;skip&quot; only for the &quot;look ahead to validate&qu=
ot; part. Not to skip<br>
completely.<br><br>&gt;&nbsp;&nbsp; &bull; Restructure the C code so as mar=
ker adjustments are always<br>&nbsp;&nbsp;&nbsp; immediately before deletio=
n records<br><br>I meant &quot;chronologically&quot; before, not &quot;befo=
re&quot; in the list. I think<br>
the desired ordering would be:<br><br>&nbsp; Value: (nil<br>&nbsp;&nbsp; (#=
(&quot;&nbsp;&nbsp; &quot; 0 3<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (fontified=
 t))<br>&nbsp;&nbsp;&nbsp; . 12)<br>&nbsp;&nbsp; (#&lt;marker at 12 in foo.=
py&gt; . -2)<br>&nbsp;&nbsp; (#&lt;marker at 12 in foo.py&gt; . -2)<br>&nbs=
p;&nbsp; (#&lt;marker in no buffer&gt; . -3)<br>
&nbsp;&nbsp; (#&lt;marker in no buffer&gt; . -2)<br>&nbsp;&nbsp; (t 20985 2=
6927 0 0))<br><br></div>

--047d7b414e6070e76c04f4f5df5c--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#16818; Package emacs. Full text available.

Message received at 16818 <at> debbugs.gnu.org:


Received: (at 16818) by debbugs.gnu.org; 19 Mar 2014 13:36:24 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Mar 19 09:36:24 2014
Received: from localhost ([127.0.0.1]:40837 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1WQGfP-0003pi-9S
	for submit <at> debbugs.gnu.org; Wed, 19 Mar 2014 09:36:24 -0400
Received: from mail-oa0-f54.google.com ([209.85.219.54]:50059)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <gundaetiapo@HIDDEN>) id 1WQGfK-0003pY-HI
 for 16818 <at> debbugs.gnu.org; Wed, 19 Mar 2014 09:36:19 -0400
Received: by mail-oa0-f54.google.com with SMTP id n16so8351973oag.13
 for <16818 <at> debbugs.gnu.org>; Wed, 19 Mar 2014 06:36:17 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=mime-version:in-reply-to:references:date:message-id:subject:from:to
 :cc:content-type;
 bh=yWBB22QAbCHN5znHxE4nGLUVn/Lv0eGULsVjbkegk/o=;
 b=iQn4uIpkDthYUBdp7Ryn8J3Ttpb/yxQVcdlSObvtXk4HsgvG0pGvYsXLQqYJAiZCvU
 Dj8R6Fwjg8DFhdGE6jZyAWU+BIhh2K8MRdVvfc6StcWJpv+/zAATaJ0/bCqSsrEd6IMk
 v0v2AZgq7rcrgphPxiD6y9a+t4VAU55gkKoG/ZpRiRGp59HU8M1T2UKGrp0xxgnci87d
 mfWaGjk2Zh+4neY5k5VbQaneD0pr4B3pkNUAeHtJtfQDM6tPUisGTJyBEsqaKeDSswQg
 UfwpTA/41LwY06VVEhf7KbUHxSnt+gTloPlmB77bxKviFC0jIveophHfd62pPSIwcIgE
 fuzg==
MIME-Version: 1.0
X-Received: by 10.182.142.37 with SMTP id rt5mr445722obb.76.1395236177667;
 Wed, 19 Mar 2014 06:36:17 -0700 (PDT)
Received: by 10.76.6.44 with HTTP; Wed, 19 Mar 2014 06:36:17 -0700 (PDT)
In-Reply-To: <jwva9co2xs4.fsf-monnier+emacsbugs@HIDDEN>
References: <CAFM41H0EA=TyArGBMEwDWy5nbHsfmN8Ev77P2QrvmbMHifnmAg@HIDDEN>
 <handler.16818.B.13928481719895.ack <at> debbugs.gnu.org>
 <CAFM41H0dB_qCzwQLQ4g86Qwbt8VnvqYru=yf0TPD9UeL6qsUkQ@HIDDEN>
 <jwv1tyyo06q.fsf-monnier+emacsbugs@HIDDEN>
 <CAFM41H2Q-x8L9jPjUNk=9TJoc3mDz2P19UV0bK1RbZ-25nYQZg@HIDDEN>
 <jwvvbw2euon.fsf-monnier+emacsbugs@HIDDEN>
 <CAFM41H0J7GFE2andkrqR7Tdz2Nm4MPXY20sufUeR_OyyitwS=g@HIDDEN>
 <jwvtxb39fia.fsf-monnier+emacsbugs@HIDDEN>
 <CAFM41H3gjuKz4joOw3eLRoNkbJ43Dh37Kvfhocv-zpkLO8BjHg@HIDDEN>
 <jwvk3byz11x.fsf-monnier+emacsbugs@HIDDEN>
 <jwvlhwexjdk.fsf-monnier+emacsbugs@HIDDEN>
 <CAFM41H2fmREiVOm6Vh4KGeRLSLM99cMbsHKdHn_86p_dj=1yLw@HIDDEN>
 <jwva9co2xs4.fsf-monnier+emacsbugs@HIDDEN>
Date: Wed, 19 Mar 2014 09:36:17 -0400
Message-ID: <CAFM41H3iBfFjvS2KR-dQso0ST_9A3=5GLghC3-=KEV76hBJkFQ@HIDDEN>
Subject: Re: bug#16818: Acknowledgement (Undo in region after markers in undo
 history relocated)
From: Barry OReilly <gundaetiapo@HIDDEN>
To: Stefan <monnier@HIDDEN>
Content-Type: multipart/alternative; boundary=001a11c2ec9abf802704f4f5bcea
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 16818
Cc: 16818 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

--001a11c2ec9abf802704f4f5bcea
Content-Type: text/plain; charset=ISO-8859-1

> The "move-after" markers will be at (+ del-pos (length
> inserted-text)) rather than at del-pos.

Right, thanks for catching that flaw.

> I'd have the same comment here, but if we emit a warning for sole
> marker-adjustments in the "non-region" code, we don't really have to
> worry about them here.

If you're saying changes under undo-make-selective-list are not
necessary, remember that currently it can create a list like:

  (nil (#<marker at 141 in *scratch*> . -3) (#<marker at 190 in *scratch*>
. -3) nil (aaa . 141) nil (141 . 144) nil)

I don't think the original recipe of this bug report should generate a
warning. Rather, I had undo-make-selective-list filter out the marker
adjustments so as the above list would have (aaa . 141) at the head.

> I think we should only change the entry corresponding to a deletion
> such that it directly handles all the immediately following
> marker-adjustments

They don't always immediately follow. An integer record can be between
them. For example, at the end of the undo-test-marker-adjustment-moved
test I posted previously, buffer-undo-list is:

  (nil (1 . 4) nil (abc . 1) 12 (#<marker at 7 in  *temp*-216909> . -1) nil
(1 . 12) (t . 0))

Also, (t sec-high sec-low microsec picosec) entries can be in between.
eg it was easy to bring about this buffer-undo-list:

  Value: (nil
   (#("   " 0 3
      (fontified t))
    . 12)
   (t 20985 26927 0 0)
   (#<marker at 12 in foo.py> . -2)
   (#<marker at 12 in foo.py> . -2)
   (#<marker in no buffer> . -3)
   (#<marker in no buffer> . -2))

I suppose some options are:

  * Implement your proposal but skip over the (t ...) and integer
    records
  * Restructure the C code so as marker adjustments are always
    immediately before deletion records
  * Revisit the approach of fixing markers that move to unrelated
    locations.

Let me know and thank you for your guidance.

--001a11c2ec9abf802704f4f5bcea
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">&gt; The &quot;move-after&quot; markers will be at (+ del-=
pos (length<br>&gt; inserted-text)) rather than at del-pos.<br><br>Right, t=
hanks for catching that flaw.<br><br>&gt; I&#39;d have the same comment her=
e, but if we emit a warning for sole<br>
&gt; marker-adjustments in the &quot;non-region&quot; code, we don&#39;t re=
ally have to<br>&gt; worry about them here.<br><br>If you&#39;re saying cha=
nges under undo-make-selective-list are not<br>necessary, remember that cur=
rently it can create a list like:<br>
<br>&nbsp; (nil (#&lt;marker at 141 in *scratch*&gt; . -3) (#&lt;marker at =
190 in *scratch*&gt;<br>. -3) nil (aaa . 141) nil (141 . 144) nil)<br><br>I=
 don&#39;t think the original recipe of this bug report should generate a<b=
r>
warning. Rather, I had undo-make-selective-list filter out the marker<br>ad=
justments so as the above list would have (aaa . 141) at the head.<br><br>&=
gt; I think we should only change the entry corresponding to a deletion<br>
&gt; such that it directly handles all the immediately following<br>&gt; ma=
rker-adjustments<br><br>They don&#39;t always immediately follow. An intege=
r record can be between<br>them. For example, at the end of the undo-test-m=
arker-adjustment-moved<br>
test I posted previously, buffer-undo-list is:<br><br>&nbsp; (nil (1 . 4) n=
il (abc . 1) 12 (#&lt;marker at 7 in&nbsp; *temp*-216909&gt; . -1) nil (1 .=
 12) (t . 0))<br><br>Also, (t sec-high sec-low microsec picosec) entries ca=
n be in between.<br>
eg it was easy to bring about this buffer-undo-list:<br><br>&nbsp; Value: (=
nil<br>&nbsp;&nbsp; (#(&quot;&nbsp;&nbsp; &quot; 0 3<br>&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp; (fontified t))<br>&nbsp;&nbsp;&nbsp; . 12)<br>&nbsp;&nbsp; (t 2=
0985 26927 0 0)<br>&nbsp;&nbsp; (#&lt;marker at 12 in foo.py&gt; . -2)<br>&=
nbsp;&nbsp; (#&lt;marker at 12 in foo.py&gt; . -2)<br>
&nbsp;&nbsp; (#&lt;marker in no buffer&gt; . -3)<br>&nbsp;&nbsp; (#&lt;mark=
er in no buffer&gt; . -2))<br><br>I suppose some options are:<br><br>&nbsp;=
 &bull; Implement your proposal but skip over the (t ...) and integer<br>&n=
bsp;&nbsp;&nbsp; records<br>&nbsp; &bull; Restructure the C code so as mark=
er adjustments are always<br>
&nbsp;&nbsp;&nbsp; immediately before deletion records<br>&nbsp; &bull; Rev=
isit the approach of fixing markers that move to unrelated<br>&nbsp;&nbsp;&=
nbsp; locations.<br><br>Let me know and thank you for your guidance.<br><br=
></div>

--001a11c2ec9abf802704f4f5bcea--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#16818; Package emacs. Full text available.

Message received at 16818 <at> debbugs.gnu.org:


Received: (at 16818) by debbugs.gnu.org; 18 Mar 2014 00:02:47 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Mar 17 20:02:47 2014
Received: from localhost ([127.0.0.1]:39352 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1WPhUU-0001Dw-Fy
	for submit <at> debbugs.gnu.org; Mon, 17 Mar 2014 20:02:46 -0400
Received: from ironport2-out.teksavvy.com ([206.248.154.181]:41672)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <monnier@HIDDEN>) id 1WPhUS-0001Do-NC
 for 16818 <at> debbugs.gnu.org; Mon, 17 Mar 2014 20:02:45 -0400
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: Av8EABK/CFHO+KKg/2dsb2JhbABEuzWDWRdzgh4BAQQBViMQCzQSFBgNJIgeBsEtjQ2DfQOOGJZigV6DE4FK
X-IPAS-Result: Av8EABK/CFHO+KKg/2dsb2JhbABEuzWDWRdzgh4BAQQBViMQCzQSFBgNJIgeBsEtjQ2DfQOOGJZigV6DE4FK
X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="52406720"
Received: from 206-248-162-160.dsl.teksavvy.com (HELO pastel.home)
 ([206.248.162.160])
 by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA;
 17 Mar 2014 20:02:43 -0400
Received: by pastel.home (Postfix, from userid 20848)
 id B01E26028B; Mon, 17 Mar 2014 20:02:43 -0400 (EDT)
From: Stefan <monnier@HIDDEN>
To: Barry OReilly <gundaetiapo@HIDDEN>
Subject: Re: bug#16818: Acknowledgement (Undo in region after markers in undo
 history relocated)
Message-ID: <jwva9co2xs4.fsf-monnier+emacsbugs@HIDDEN>
References: <CAFM41H0EA=TyArGBMEwDWy5nbHsfmN8Ev77P2QrvmbMHifnmAg@HIDDEN>
 <handler.16818.B.13928481719895.ack <at> debbugs.gnu.org>
 <CAFM41H0dB_qCzwQLQ4g86Qwbt8VnvqYru=yf0TPD9UeL6qsUkQ@HIDDEN>
 <jwv1tyyo06q.fsf-monnier+emacsbugs@HIDDEN>
 <CAFM41H2Q-x8L9jPjUNk=9TJoc3mDz2P19UV0bK1RbZ-25nYQZg@HIDDEN>
 <jwvvbw2euon.fsf-monnier+emacsbugs@HIDDEN>
 <CAFM41H0J7GFE2andkrqR7Tdz2Nm4MPXY20sufUeR_OyyitwS=g@HIDDEN>
 <jwvtxb39fia.fsf-monnier+emacsbugs@HIDDEN>
 <CAFM41H3gjuKz4joOw3eLRoNkbJ43Dh37Kvfhocv-zpkLO8BjHg@HIDDEN>
 <jwvk3byz11x.fsf-monnier+emacsbugs@HIDDEN>
 <jwvlhwexjdk.fsf-monnier+emacsbugs@HIDDEN>
 <CAFM41H2fmREiVOm6Vh4KGeRLSLM99cMbsHKdHn_86p_dj=1yLw@HIDDEN>
Date: Mon, 17 Mar 2014 20:02:43 -0400
In-Reply-To: <CAFM41H2fmREiVOm6Vh4KGeRLSLM99cMbsHKdHn_86p_dj=1yLw@HIDDEN>
 (Barry OReilly's message of "Mon, 17 Mar 2014 19:05:34 -0400")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.3 (/)
X-Debbugs-Envelope-To: 16818
Cc: 16818 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.3 (/)

>> The primitive-undo fix should be safe enough for 24.4, so if you
>> want to code this up and install it, feel free.
> I have attached the patch for this, which I'll install if nothing
> comes up from review.

Thanks.  A few comments below.

--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -2229,6 +2229,7 @@
         (did-apply nil)
         (next nil))
     (while (> arg 0)
+      (let (del-pos)
       (while (setq next (pop list))     ;Exit inner loop at undo boundary.
         ;; Handle an integer by setting point to that value.
         (pcase next
@@ -2289,6 +2290,7 @@
            (when (let ((apos (abs pos)))
                    (or (< apos (point-min)) (> apos (point-max))))
              (error "Changes to be undone are outside visible portion of buffer"))
+             (setq del-pos pos)
            (if (< pos 0)
                (progn
                  (goto-char (- pos))
@@ -2303,11 +2305,14 @@
              (goto-char pos)))
           ;; (MARKER . OFFSET) means a marker MARKER was adjusted by OFFSET.
           (`(,(and marker (pred markerp)) . ,(and offset (pred integerp)))
-           (when (marker-buffer marker)
+             (when (and del-pos
+                        (integerp (marker-position marker))
+                        (= del-pos marker)
+                        (marker-buffer marker))
              (set-marker marker
                          (- marker offset)
                          (marker-buffer marker))))
-          (_ (error "Unrecognized entry in undo list %S" next))))
+            (_ (error "Unrecognized entry in undo list %S" next)))))
       (setq arg (1- arg)))
     ;; Make sure an apply entry produces at least one undo entry,
     ;; so the test in `undo' for continuing an undo series

The "move-after" markers will be at (+ del-pos (length inserted-text))
rather than at del-pos.  Also, a lone (MARKER . OFFSET) entry will
arbitrarily use some unrelated earlier del-pos.  Admittedly, such lone
(MARKER . OFFSET) entries should/will never happen, but I'd rather we
catch them and emit a warning than silently do something arbitrary.

IOW, I think we should only change the entry corresponding to a deletion
such that it directly handles all the immediately following
marker-adjustments (it can check them before doing the insertion, hence
using del-pos without having to care about insert-after vs
insert-before).  Then the current handling of marker-adjustments can be
changed to emit a warning.

> @@ -2351,18 +2354,30 @@ If we find an element that crosses an edge of this region,
>  we stop and ignore all further elements."
>    (let ((undo-list-copy (undo-copy-list buffer-undo-list))
>  	(undo-list (list nil))
> -	undo-adjusted-markers
> +        ;; The position of a deletion record (TEXT . POSITION) of the
> +        ;; current change group.
> +        ;;
> +        ;; This is used to check that marker adjustmenets are in the
> +        ;; region.  Bug 16818 describes why the marker's position is
> +        ;; not suitable.
> +        del-pos
>  	some-rejected
>  	undo-elt temp-undo-list delta)
>      (while undo-list-copy
>        (setq undo-elt (car undo-list-copy))
> +      ;; Update del-pos
> +      (if undo-elt
> +          (when (and (consp undo-elt) (stringp (car undo-elt)))
> +            (setq del-pos (cdr undo-elt)))
> +        ;; Undo boundary means new change group, so unset del-pos
> +        (setq del-pos nil))
>        (let ((keep-this
>  	     (cond ((and (consp undo-elt) (eq (car undo-elt) t))
>  		    ;; This is a "was unmodified" element.
>  		    ;; Keep it if we have kept everything thus far.
>  		    (not some-rejected))
>  		   (t
> -		    (undo-elt-in-region undo-elt start end)))))
> +		    (undo-elt-in-region undo-elt start end del-pos)))))
>  	(if keep-this
>  	    (progn
>  	      (setq end (+ end (cdr (undo-delta undo-elt))))

I'd have the same comment here, but if we emit a warning for sole
marker-adjustments in the "non-region" code, we don't really have to
worry about them here.

But this is also affected by the issue of "move-after" markers where
`del-pos' is not sufficient info since those markers won't be at del-pos
any more if they were at del-pos before we inserted the deleted text.


        Stefan




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#16818; Package emacs. Full text available.

Message received at 16818 <at> debbugs.gnu.org:


Received: (at 16818) by debbugs.gnu.org; 17 Mar 2014 23:05:44 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Mar 17 19:05:44 2014
Received: from localhost ([127.0.0.1]:39331 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1WPgbH-0008Eq-4U
	for submit <at> debbugs.gnu.org; Mon, 17 Mar 2014 19:05:44 -0400
Received: from mail-ob0-f170.google.com ([209.85.214.170]:51874)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <gundaetiapo@HIDDEN>) id 1WPgb9-0008Ed-Tu
 for 16818 <at> debbugs.gnu.org; Mon, 17 Mar 2014 19:05:37 -0400
Received: by mail-ob0-f170.google.com with SMTP id uz6so6263567obc.15
 for <16818 <at> debbugs.gnu.org>; Mon, 17 Mar 2014 16:05:35 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=mime-version:in-reply-to:references:date:message-id:subject:from:to
 :cc:content-type;
 bh=lSRmf17xk4fn8rw1xcIHtXpwfTBxtVWq9HURX/bcbsc=;
 b=iopgxvT9O751JoJ5oYFkiReaKnX9fe/IyFQfXQyGx9CazUlpDv2bQEPqIwgK5IJN6z
 lRn1sKvTHfb7PAwRgcHya2HWqR5Em4/Dm9ik5qle2QQodv/DKQXgbeHh1Fnw+g1V0jQb
 H8Ww++sxcc2j//DWLlf5l8HsDXlMFyZca+4lzGusXer3+cScG6rxz/LZC0KhgmiHcj5J
 p9XrL0uheUSEI717onPB+eL3ckTdTxotTle2KiZLoJHEKCuYhvSwvSW53P8U5PMqmrWu
 GGhZfEAbXyaLWQauJEzIO0aBxCbfDkxeFs3HalOyrW/Ad+6CZJip27CbpQI34B1S3QTQ
 AKyw==
MIME-Version: 1.0
X-Received: by 10.182.44.167 with SMTP id f7mr22586549obm.3.1395097534958;
 Mon, 17 Mar 2014 16:05:34 -0700 (PDT)
Received: by 10.76.6.44 with HTTP; Mon, 17 Mar 2014 16:05:34 -0700 (PDT)
In-Reply-To: <jwvlhwexjdk.fsf-monnier+emacsbugs@HIDDEN>
References: <CAFM41H0EA=TyArGBMEwDWy5nbHsfmN8Ev77P2QrvmbMHifnmAg@HIDDEN>
 <handler.16818.B.13928481719895.ack <at> debbugs.gnu.org>
 <CAFM41H0dB_qCzwQLQ4g86Qwbt8VnvqYru=yf0TPD9UeL6qsUkQ@HIDDEN>
 <jwv1tyyo06q.fsf-monnier+emacsbugs@HIDDEN>
 <CAFM41H2Q-x8L9jPjUNk=9TJoc3mDz2P19UV0bK1RbZ-25nYQZg@HIDDEN>
 <jwvvbw2euon.fsf-monnier+emacsbugs@HIDDEN>
 <CAFM41H0J7GFE2andkrqR7Tdz2Nm4MPXY20sufUeR_OyyitwS=g@HIDDEN>
 <jwvtxb39fia.fsf-monnier+emacsbugs@HIDDEN>
 <CAFM41H3gjuKz4joOw3eLRoNkbJ43Dh37Kvfhocv-zpkLO8BjHg@HIDDEN>
 <jwvk3byz11x.fsf-monnier+emacsbugs@HIDDEN>
 <jwvlhwexjdk.fsf-monnier+emacsbugs@HIDDEN>
Date: Mon, 17 Mar 2014 19:05:34 -0400
Message-ID: <CAFM41H2fmREiVOm6Vh4KGeRLSLM99cMbsHKdHn_86p_dj=1yLw@HIDDEN>
Subject: Re: bug#16818: Acknowledgement (Undo in region after markers in undo
 history relocated)
From: Barry OReilly <gundaetiapo@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
Content-Type: multipart/mixed; boundary=001a11c1d7e000012604f4d57529
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 16818
Cc: 16818 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

--001a11c1d7e000012604f4d57529
Content-Type: multipart/alternative; boundary=001a11c1d7e000012104f4d57527

--001a11c1d7e000012104f4d57527
Content-Type: text/plain; charset=ISO-8859-1

> The primitive-undo fix should be safe enough for 24.4, so if you
> want to code this up and install it, feel free.

I have attached the patch for this, which I'll install if nothing
comes up from review.

--001a11c1d7e000012104f4d57527
Content-Type: text/html; charset=ISO-8859-1

<div dir="ltr">&gt; The primitive-undo fix should be safe enough for 24.4, so if you<br>&gt; want to code this up and install it, feel free.<br><br>I have attached the patch for this, which I&#39;ll install if nothing<br>comes up from review.<br>
<br></div>

--001a11c1d7e000012104f4d57527--
--001a11c1d7e000012604f4d57529
Content-Type: text/plain; charset=US-ASCII; name="undo-skip-markers.diff"
Content-Disposition: attachment; filename="undo-skip-markers.diff"
Content-Transfer-Encoding: base64
X-Attachment-Id: f_hswd1ixa0

ZGlmZiAtLWdpdCBhL2xpc3AvQ2hhbmdlTG9nIGIvbGlzcC9DaGFuZ2VMb2cKaW5kZXggYTFlZTVi
Yi4uYTUzZjVkNiAxMDA2NDQK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cG9pbnQtbWluKSBiZWcpICg8IChwb2ludC1tYXgpIGVuZCkpCi0gICAgICAgICAgICAgKGVycm9y
ICJDaGFuZ2VzIHRvIGJlIHVuZG9uZSBhcmUgb3V0c2lkZSB2aXNpYmxlIHBvcnRpb24gb2YgYnVm
ZmVyIikpCi0gICAgICAgICAgIDs7IFNldCBwb2ludCBmaXJzdCB0aGluZywgc28gdGhhdCB1bmRv
aW5nIHRoaXMgdW5kbwotICAgICAgICAgICA7OyBkb2VzIG5vdCBzZW5kIHBvaW50IGJhY2sgdG8g
d2hlcmUgaXQgaXMgbm93LgotICAgICAgICAgICAoZ290by1jaGFyIGJlZykKLSAgICAgICAgICAg
KGRlbGV0ZS1yZWdpb24gYmVnIGVuZCkpCi0gICAgICAgICAgOzsgRWxlbWVudCAoYXBwbHkgRlVO
IC4gQVJHUykgbWVhbnMgY2FsbCBGVU4gdG8gdW5kby4KLSAgICAgICAgICAoYChhcHBseSAuICxm
dW4tYXJncykKLSAgICAgICAgICAgKGxldCAoKGN1cnJidWZmIChjdXJyZW50LWJ1ZmZlcikpKQot
ICAgICAgICAgICAgIChpZiAoaW50ZWdlcnAgKGNhciBmdW4tYXJncykpCi0gICAgICAgICAgICAg
ICAgIDs7IExvbmcgZm9ybWF0OiAoYXBwbHkgREVMVEEgU1RBUlQgRU5EIEZVTiAuIEFSR1MpLgot
ICAgICAgICAgICAgICAgICAocGNhc2UtbGV0KiAoKGAoLGRlbHRhICxzdGFydCAsZW5kICxmdW4g
LiAsYXJncykgZnVuLWFyZ3MpCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoc3RhcnQt
bWFyayAoY29weS1tYXJrZXIgc3RhcnQgbmlsKSkKLSAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgIChlbmQtbWFyayAoY29weS1tYXJrZXIgZW5kIHQpKSkKLSAgICAgICAgICAgICAgICAgICAo
d2hlbiAob3IgKD4gKHBvaW50LW1pbikgc3RhcnQpICg8IChwb2ludC1tYXgpIGV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gsKGFuZCBzdHJpbmcgKHByZWQgc3RyaW5ncCkpIC4gLChhbmQg
cG9zIChwcmVkIGludGVnZXJwKSkpCi0gICAgICAgICAgICh3aGVuIChsZXQgKChhcG9zIChhYnMg
cG9zKSkpCi0gICAgICAgICAgICAgICAgICAgKG9yICg8IGFwb3MgKHBvaW50LW1pbikpICg+IGFw
b3MgKHBvaW50LW1heCkpKSkKLSAgICAgICAgICAgICAoZXJyb3IgIkNoYW5nZXMgdG8gYmUgdW5k
b25lIGFyZSBvdXRzaWRlIHZpc2libGUgcG9ydGlvbiBvZiBidWZmZXIiKSkKLSAgICAgICAgICAg
KGlmICg8IHBvcyAwKQotICAgICAgICAgICAgICAgKHByb2duCi0gICAgICAgICAgICAgICAgIChn
b3RvLWNoYXIgKC0gcG9zKSkKLSAgICAgICAgICAgICAgICAgKGluc2VydCBzdHJpbmcpKQotICAg
ICAgICAgICAgIChnb3RvLWNoYXIgcG9zKQotICAgICAgICAgICAgIDs7IE5vdyB0aGF0IHdlIHJl
Y29yZCBtYXJrZXIgYWRqdXN0bWVudHMKLSAgICAgICAgICAgICA7OyAoY2F1c2VkIGJ5IGRlbGV0
aW9uKSBmb3IgdW5kbywKLSAgICAgICAgICAgICA7OyB3ZSBzaG91bGQgYWx3YXlzIGluc2VydCBh
ZnRlciBtYXJrZXJzLAotICAgICAgICAgICAgIDs7IHNvIHRoYXQgdW5kb2luZyB0aGUgbWFya2Vy
IGFkanVzdG1lbnRzCi0gICAgICAgICAgICAgOzsgcHV0IHRoZSBtYXJrZXJzIGJhY2sgaW4gdGhl
IHJpZ2h0IHBsYWNlLgotICAgICAgICAgICAgIChpbnNlcnQgc3RyaW5nKQotICAgICAgICAgICAg
IChnb3RvLWNoYXIgcG9zKSkpCi0gICAgICAgICAgOzsgKE1BUktFUiAuIE9GRlNFVCkgbWVhbnMg
YSBtYXJrZXIgTUFSS0VSIHdhcyBhZGp1c3RlZCBieSBPRkZTRVQuCi0gICAgICAgICAgKGAoLChh
bmQgbWFya2VyIChwcmVkIG1hcmtlcnApKSAuICwoYW5kIG9mZnNldCAocHJlZCBpbnRlZ2VycCkp
KQotICAgICAgICAgICAod2hlbiAobWFya2VyLWJ1ZmZlciBtYXJrZXIpCi0gICAgICAgICAgICAg
KHNldC1tYXJrZXIgbWFya2VyCi0gICAgICAgICAgICAgICAgICAgICAgICAgKC0gbWFya2VyIG9m
ZnNldCkKLSAgICAgICAgICAgICAgICAgICAgICAgICAobWFya2VyLWJ1ZmZlciBtYXJrZXIpKSkp
Ci0gICAgICAgICAgKF8gKGVycm9yICJVbnJlY29nbml6ZWQgZW50cnkgaW4gdW5kbyBsaXN0ICVT
IiBuZXh0KSkpKQorICAgICAgKGxldCAoZGVsLXBvcykKKyAgICAgICAgKHdoaWxlIChzZXRxIG5l
eHQgKHBvcCBsaXN0KSkgICAgIDtFeGl0IGlubmVyIGxvb3AgYXQgdW5kbyBib3VuZGFyeS4KKyAg
ICAgICAgICA7OyBIYW5kbGUgYW4gaW50ZWdlciBieSBzZXR0aW5nIHBvaW50IHRvIHRoYXQgdmFs
dWUuCisgICAgICAgICAgKHBjYXNlIG5leHQKKyAgICAgICAgICAgICgocHJlZCBpbnRlZ2VycCkg
KGdvdG8tY2hhciBuZXh0KSkKKyAgICAgICAgICAgIDs7IEVsZW1lbnQgKHQgLiBUSU1FKSByZWNv
cmRzIHByZXZpb3VzIG1vZHRpbWUuCisgICAgICAgICAgICA7OyBQcmVzZXJ2ZSBhbnkgZmxhZyBv
ZiBOT05FWElTVEVOVF9NT0RUSU1FX05TRUNTIG9yCisgICAgICAgICAgICA7OyBVTktOT1dOX01P
RFRJTUVfTlNFQ1MuCisgICAgICAgICAgICAoYCh0IC4gLHRpbWUpCisgICAgICAgICAgICAgOzsg
SWYgdGhpcyByZWNvcmRzIGFuIG9ic29sZXRlIHNhdmUKKyAgICAgICAgICAgICA7OyAobm90IG1h
dGNoaW5nIHRoZSBhY3R1YWwgZGlzayBmaWxlKQorICAgICAgICAgICAgIDs7IHRoZW4gZG9uJ3Qg
bWFyayB1bm1vZGlmaWVkLgorICAgICAgICAgICAgICh3aGVuIChvciAoZXF1YWwgdGltZSAodmlz
aXRlZC1maWxlLW1vZHRpbWUpKQorICAgICAgICAgICAgICAgICAgICAgICAoYW5kIChjb25zcCB0
aW1lKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgIChlcXVhbCAobGlzdCAoY2FyIHRpbWUp
IChjZHIgdGltZSkpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICh2aXNpdGVk
LWZpbGUtbW9kdGltZSkpKSkKKyAgICAgICAgICAgICAgICh3aGVuIChmYm91bmRwICd1bmxvY2st
YnVmZmVyKQorICAgICAgICAgICAgICAgICAodW5sb2NrLWJ1ZmZlcikpCisgICAgICAgICAgICAg
ICAoc2V0LWJ1ZmZlci1tb2RpZmllZC1wIG5pbCkpKQorICAgICAgICAgICAgOzsgRWxlbWVudCAo
bmlsIFBST1AgVkFMIEJFRyAuIEVORCkgaXMgcHJvcGVydHkgY2hhbmdlLgorICAgICAgICAgICAg
KGAobmlsIC4gLChvciBgKCxwcm9wICx2YWwgLGJlZyAuICxlbmQpIHBjYXNlLS1kb250Y2FyZSkp
CisgICAgICAgICAgICAgKHdoZW4gKG9yICg+IChwb2ludC1taW4pIGJlZykgKDwgKHBvaW50LW1h
eCkgZW5kKSkKKyAgICAgICAgICAgICAgIChlcnJvciAiQ2hhbmdlcyB0byBiZSB1bmRvbmUgYXJl
IG91dHNpZGUgdmlzaWJsZSBwb3J0aW9uIG9mIGJ1ZmZlciIpKQorICAgICAgICAgICAgIChwdXQt
dGV4dC1wcm9wZXJ0eSBiZWcgZW5kIHByb3AgdmFsKSkKKyAgICAgICAgICAgIDs7IEVsZW1lbnQg
KEJFRyAuIEVORCkgbWVhbnMgcmFuZ2Ugd2FzIGluc2VydGVkLgorICAgICAgICAgICAgKGAoLChh
bmQgYmVnIChwcmVkIGludGVnZXJwKSkgLiAsKGFuZCBlbmQgKHByZWQg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xlbmQgLGZ1biAuICxhcmdzKSBmdW4tYXJncykKKyAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgKHN0YXJ0LW1hcmsgKGNvcHktbWFya2VyIHN0YXJ0IG5pbCkp
CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChlbmQtbWFyayAoY29weS1tYXJrZXIg
ZW5kIHQpKSkKKyAgICAgICAgICAgICAgICAgICAgICh3aGVuIChvciAoPiAocG9pbnQtbWluKSBz
dGFydCkgKDwgKHBvaW50LW1heCkgZW5kKSkKKyAgICAgICAgICAgICAgICAgICAgICAgKGVycm9y
ICJDaGFuZ2VzIHRvIGJlIHVuZG9uZSBhcmUgb3V0c2lkZSB2aXNpYmxlIHBvcnRpb24gb2YgYnVm
ZmVyIikpCisgICAgICAgICAgICAgICAgICAgICAoYXBwbHkgZnVuIGFyZ3MpIDs7IFVzZSBgc2F2
ZS1jdXJyZW50LWJ1ZmZlcic/CisgICAgICAgICAgICAgICAgICAgICA7OyBDaGVjayB0aGF0IHRo
ZSBmdW5jdGlvbiBkaWQgd2hhdCB0aGUgZW50cnkKKyAgICAgICAgICAgICAgICAgICAgIDs7IHNh
aWQgaXQgd291bGQgZG8uCisgICAgICAgICAgICAgICAgICAgICAodW5sZXNzIChhbmQgKD0gc3Rh
cnQgc3RhcnQtbWFyaykKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoPSAoKyBk
ZWx0YSBlbmQpIGVuZC1tYXJrKSkKKyAgICAgICAgICAgICAgICAgICAgICAgKGVycm9yICJDaGFu
Z2VzIHRvIGJlIHVuZG9uZSBieSBmdW5jdGlvbiBkaWZmZXJlbnQgdGhhbiBhbm5vdW5jZWQiKSkK
KyAgICAgICAgICAgICAgICAgICAgIChzZXQtbWFya2VyIHN0YXJ0LW1hcmsgbmlsKQorICAgICAg
ICAgICAgICAgICAgICAgKHNldC1tYXJrZXIgZW5kLW1hcmsgbmlsKSkKKyAgICAgICAgICAgICAg
ICAgKGFwcGx5IGZ1bi1hcmdzKSkKKyAgICAgICAgICAgICAgICh1bmxlc3MgKGVxIGN1cnJidWZm
IChjdXJyZW50LWJ1ZmZlcikpCisgICAgICAgICAgICAgICAgIChlcnJvciAiVW5kbyBmdW5jdGlv
biBzd2l0Y2hlZCBidWZmZXIiKSkKKyAgICAgICAgICAgICAgIChzZXRxIGRpZC1hcHBseSB0KSkp
CisgICAgICAgICAgICA7OyBFbGVtZW50IChTVFJJTkcgLiBQT1MpIG1lYW5zIFNUUklORyB3YXMg
ZGVsZXRlZC4KKyAgICAgICAgICAgIChgKCwoYW5kIHN0cmluZyAocHJlZCBzdHJpbmdwKSkgLiAs
KGFuZCBwb3MgKHByZWQgaW50ZWdlcnApKSkKKyAgICAgICAgICAgICAod2hlbiAobGV0ICgoYXBv
cyAoYWJzIHBvcykpKQorICAgICAgICAgICAgICAgICAgICAgKG9yICg8IGFwb3MgKHBvaW50LW1p
bikpICg+IGFwb3MgKHBvaW50LW1heCkpKSkKKyAgICAgICAgICAgICAgIChlcnJvciAiQ2hhbmdl
cyB0byBiZSB1bmRvbmUgYXJlIG91dHNpZGUgdmlzaWJsZSBwb3J0aW9uIG9mIGJ1ZmZlciIpKQor
ICAgICAgICAgICAgIChzZXRxIGRlbC1wb3MgcG9zKQorICAgICAgICAgICAgIChpZiAoPCBwb3Mg
MCkKKyAgICAgICAgICAgICAgICAgKHByb2duCisgICAgICAgICAgICAgICAgICAgKGdvdG8tY2hh
ciAoLSBwb3MpKQorICAgICAgICAgICAgICAgICAgIChpbnNlcnQgc3RyaW5nKSkKKyAgICAgICAg
ICAgICAgIChnb3RvLWNoYXIgcG9zKQorICAgICAgICAgICAgICAgOzsgTm93IHRoYXQgd2UgcmVj
b3JkIG1hcmtlciBhZGp1c3RtZW50cworICAgICAgICAgICAgICAgOzsgKGNhdXNlZCBieSBkZWxl
dGlvbikgZm9yIHVuZG8sCisgICAgICAgICAgICAgICA7OyB3ZSBzaG91bGQgYWx3YXlzIGluc2Vy
dCBhZnRlciBtYXJrZXJzLAorICAgICAgICAgICAgICAgOzsgc28gdGhhdCB1bmRvaW5nIHRoZSBt
YXJrZXIgYWRqdXN0bWVudHMKKyAgICAgICAgICAgICAgIDs7IHB1dCB0aGUgbWFya2VycyBiYWNr
IGluIHRoZSByaWdodCBwbGFjZS4KKyAgICAgICAgICAgICAgIChpbnNlcnQgc3RyaW5nKQorICAg
ICAgICAgICAgICAgKGdvdG8tY2hhciBwb3MpKSkKKyAgICAgICAgICAgIDs7IChNQVJLRVIgLiBP
RkZTRVQpIG1lYW5zIGEgbWFya2VyIE1BUktFUiB3YXMgYWRqdXN0ZWQgYnkgT0ZGU0VULgorICAg
ICAgICAgICAgKGAoLChhbmQgbWFya2VyIChwcmVkIG1hcmtlcnApKSAuICwoYW5kIG9mZnNldCAo
cHJlZCBpbnRlZ2VycCkpKQorICAgICAgICAgICAgICh3aGVuIChhbmQgZGVsLXBvcworICAgICAg
ICAgICAgICAgICAgICAgICAgKGludGVnZXJwIChtYXJrZXItcG9zaXRpb24gbWFya2VyKSkKKyAg
ICAgICAgICAgICAgICAgICAgICAgICg9IGRlbC1wb3MgbWFya2VyKQorICAgICAgICAgICAgICAg
ICAgICAgICAgKG1hcmtlci1idWZmZXIgbWFya2VyKSkKKyAgICAgICAgICAgICAgIChzZXQtbWFy
a2VyIG1hcmtlcgorICAgICAgICAgICAgICAgICAgICAgICAgICAgKC0gbWFya2VyIG9mZnNldCkK
KyAgICAgICAgICAgICAgICAgICAgICAgICAgIChtYXJrZXItYnVmZmVyIG1hcmtlcikpKSkKKyAg
ICAgICAgICAgIChfIChlcnJvciAiVW5yZWNvZ25pemVkIGVudHJ5IGluIHVuZG8gbGlzdCAlUyIg
bmV4dCkpKSkpCiAgICAgICAoc2V0cSBhcmcgKDEtIGFyZykpKQogICAgIDs7IE1ha2Ugc3VyZSBh
biBhcHBseSBlbnRyeSBwcm9kdWNlcyBhdCBsZWFzdCBvbmUgdW5kbyBlbnRyeSwKICAgICA7OyBz
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CisgICAgKGluc2VydCAiYWFhIikKKyAgICAo
dW5kby1ib3VuZGFyeSkKKworICAgICh1bmRvKQorICAgICh1bmRvLWJvdW5kYXJ5KQorCisgICAg
KGdvdG8tY2hhciAocG9pbnQtbWF4KSkKKyAgICAoaW5zZXJ0ICJiYmIiKQorICAgICh1bmRvLWJv
dW5kYXJ5KQorCisgICAgKHB1c2gtbWFyayAocG9pbnQpIHQgdCkKKyAgICAoc2V0cSBtYXJrLWFj
dGl2ZSB0KQorICAgIChnb3RvLWNoYXIgKC0gKHBvaW50KSAzKSkKKyAgICAoZGVsZXRlLWZvcndh
cmQtY2hhciAxKQorICAgICh1bmRvLWJvdW5kYXJ5KQorCisgICAgKGluc2VydCAiYmJiIikKKyAg
ICAodW5kby1ib3VuZGFyeSkKKworICAgIChnb3RvLWNoYXIgKHBvaW50LW1pbikpCisgICAgKHB1
c2gtbWFyayAocG9pbnQpIHQgdCkKKyAgICAoc2V0cSBtYXJrLWFjdGl2ZSB0KQorICAgIChnb3Rv
LWNoYXIgKCsgKHBvaW50KSAzKSkKKyAgICAodW5kbykKKyAgICAodW5kby1ib3VuZGFyeSkKKwor
ICAgIChzaG91bGQgKHN0cmluZz0gKGJ1ZmZlci1zdHJpbmcpICJhYWFGaXJzdCBsaW5lXG5TZWNv
bmQgbGluZVxuYmJiIikpKSkKKwogKGRlZnVuIHVuZG8tdGVzdC1hbGwgKCZvcHRpb25hbCBpbnRl
cmFjdGl2ZSkKICAgIlJ1biBhbGwgdGVzdHMgZm9yIFxcW3VuZG9dLiIKICAgKGludGVyYWN0aXZl
ICJwIikK
--001a11c1d7e000012604f4d57529--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#16818; Package emacs. Full text available.

Message received at 16818 <at> debbugs.gnu.org:


Received: (at 16818) by debbugs.gnu.org; 13 Mar 2014 16:56:03 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Mar 13 12:56:03 2014
Received: from localhost ([127.0.0.1]:36087 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1WO8vJ-0003HX-S9
	for submit <at> debbugs.gnu.org; Thu, 13 Mar 2014 12:56:02 -0400
Received: from mail-ob0-f177.google.com ([209.85.214.177]:36615)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <gundaetiapo@HIDDEN>) id 1WO8vG-0003HE-9v
 for 16818 <at> debbugs.gnu.org; Thu, 13 Mar 2014 12:55:59 -0400
Received: by mail-ob0-f177.google.com with SMTP id wo20so1286316obc.36
 for <16818 <at> debbugs.gnu.org>; Thu, 13 Mar 2014 09:55:57 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=mime-version:in-reply-to:references:date:message-id:subject:from:to
 :cc:content-type;
 bh=yds9K/LX6WzPLb99bwQnyCPpiYoO59cogdX3I16Afk8=;
 b=SU6ViASh6+AbPWE5xsDGqmzc4B55sdaW3vH6kqU87hl0W1olNKxfe5bl1NfX3j6wy3
 BaokSXXwJhEoJAt4+7dd7tEG3yjR7fPiORkAMP6p0m4Cmf+fQ9wisSuZdg8PYuWOUUv1
 VA8lxzIYU6hgFX7lI06ZTiIdPbkM9HX+dcoHIATIu1DX3ZB14GaSNtqnpndFpDQss351
 fxiJhMdTBuI1r2fAMmYwBzFXcMin27p6q3S0NrgEmJ1jwsGKyxId/qA3FU3ODE1hnEmT
 HjQHbzFw9VVmvJaF57YI+SFA9+5EWtUlsvNxZ/fhEdbpWseSPJRHauGYybRVZd3pYIGy
 crvg==
MIME-Version: 1.0
X-Received: by 10.182.16.33 with SMTP id c1mr2448553obd.4.1394729757496; Thu,
 13 Mar 2014 09:55:57 -0700 (PDT)
Received: by 10.76.6.44 with HTTP; Thu, 13 Mar 2014 09:55:57 -0700 (PDT)
In-Reply-To: <jwvlhwexjdk.fsf-monnier+emacsbugs@HIDDEN>
References: <CAFM41H0EA=TyArGBMEwDWy5nbHsfmN8Ev77P2QrvmbMHifnmAg@HIDDEN>
 <handler.16818.B.13928481719895.ack <at> debbugs.gnu.org>
 <CAFM41H0dB_qCzwQLQ4g86Qwbt8VnvqYru=yf0TPD9UeL6qsUkQ@HIDDEN>
 <jwv1tyyo06q.fsf-monnier+emacsbugs@HIDDEN>
 <CAFM41H2Q-x8L9jPjUNk=9TJoc3mDz2P19UV0bK1RbZ-25nYQZg@HIDDEN>
 <jwvvbw2euon.fsf-monnier+emacsbugs@HIDDEN>
 <CAFM41H0J7GFE2andkrqR7Tdz2Nm4MPXY20sufUeR_OyyitwS=g@HIDDEN>
 <jwvtxb39fia.fsf-monnier+emacsbugs@HIDDEN>
 <CAFM41H3gjuKz4joOw3eLRoNkbJ43Dh37Kvfhocv-zpkLO8BjHg@HIDDEN>
 <jwvk3byz11x.fsf-monnier+emacsbugs@HIDDEN>
 <jwvlhwexjdk.fsf-monnier+emacsbugs@HIDDEN>
Date: Thu, 13 Mar 2014 12:55:57 -0400
Message-ID: <CAFM41H12BskNOX5UwpkJ770rK9JHJ0CMVUYNnYYOVTeMiabzVg@HIDDEN>
Subject: Re: bug#16818: Acknowledgement (Undo in region after markers in undo
 history relocated)
From: Barry OReilly <gundaetiapo@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
Content-Type: multipart/alternative; boundary=f46d04479f93c0deef04f47fd398
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 16818
Cc: 16818 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

--f46d04479f93c0deef04f47fd398
Content-Type: text/plain; charset=ISO-8859-1

> Oh, I think I see: with the current code, the mark-ring gets copies of
> markers and those copies are made "late", so if you do "C-SPC, some
> deletion around point, and then C-SPC", a new marker for the first C-SPC
> is pushed on the mark-ring, but the undo-log has an adjustment for
> mark-marker rather than for that new marker.

> IOW, I think the primitive-undo fix is needed and your fix is also
> needed.

Yes that's right. Parents cover their childrens' eyes at the violence
of our agreement.

I just discovered my patch has a bug. If I C-SPC first thing after
starting Emacs, an error is signaled because the mark is nil. I had
hoped the mark variable initialized equivalently except to make itself
available to Lisp. There are clearly holes in my understanding of the
initialization business. I'll debug that at a later time.

--f46d04479f93c0deef04f47fd398
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">&gt; Oh, I think I see: with the current code, the mark-ri=
ng gets copies of<br>&gt; markers and those copies are made &quot;late&quot=
;, so if you do &quot;C-SPC, some<br>&gt; deletion around point, and then C=
-SPC&quot;, a new marker for the first C-SPC<br>
&gt; is pushed on the mark-ring, but the undo-log has an adjustment for<br>=
&gt; mark-marker rather than for that new marker.<br><br>&gt; IOW, I think =
the primitive-undo fix is needed and your fix is also<br>&gt; needed.<br>
<br>Yes that&#39;s right. Parents cover their childrens&#39; eyes at the vi=
olence<br>of our agreement.<br><br>I just discovered my patch has a bug. If=
 I C-SPC first thing after<br>starting Emacs, an error is signaled because =
the mark is nil. I had<br>
hoped the mark variable initialized equivalently except to make itself<br>a=
vailable to Lisp. There are clearly holes in my understanding of the<br>ini=
tialization business. I&#39;ll debug that at a later time.<br><br></div>

--f46d04479f93c0deef04f47fd398--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#16818; Package emacs. Full text available.

Message received at 16818 <at> debbugs.gnu.org:


Received: (at 16818) by debbugs.gnu.org; 13 Mar 2014 14:35:11 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Mar 13 10:35:11 2014
Received: from localhost ([127.0.0.1]:36001 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1WO6j0-0007DI-Qp
	for submit <at> debbugs.gnu.org; Thu, 13 Mar 2014 10:35:11 -0400
Received: from ironport2-out.teksavvy.com ([206.248.154.181]:46027)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <monnier@HIDDEN>) id 1WO6ix-0007D4-2C
 for 16818 <at> debbugs.gnu.org; Thu, 13 Mar 2014 10:35:08 -0400
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: Av4EABK/CFFMCppy/2dsb2JhbABEvw4Xc4IeAQEEAVYjEAs0EhQYDSSIHgbBLY0Ng30DpHqBXoMTgUo
X-IPAS-Result: Av4EABK/CFFMCppy/2dsb2JhbABEvw4Xc4IeAQEEAVYjEAs0EhQYDSSIHgbBLY0Ng30DpHqBXoMTgUo
X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="51729653"
Received: from 76-10-154-114.dsl.teksavvy.com (HELO pastel.home)
 ([76.10.154.114])
 by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA;
 13 Mar 2014 10:35:05 -0400
Received: by pastel.home (Postfix, from userid 20848)
 id AAF7F60293; Thu, 13 Mar 2014 10:35:05 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
To: Barry OReilly <gundaetiapo@HIDDEN>
Subject: Re: bug#16818: Acknowledgement (Undo in region after markers in undo
 history relocated)
Message-ID: <jwvlhwexjdk.fsf-monnier+emacsbugs@HIDDEN>
References: <CAFM41H0EA=TyArGBMEwDWy5nbHsfmN8Ev77P2QrvmbMHifnmAg@HIDDEN>
 <handler.16818.B.13928481719895.ack <at> debbugs.gnu.org>
 <CAFM41H0dB_qCzwQLQ4g86Qwbt8VnvqYru=yf0TPD9UeL6qsUkQ@HIDDEN>
 <jwv1tyyo06q.fsf-monnier+emacsbugs@HIDDEN>
 <CAFM41H2Q-x8L9jPjUNk=9TJoc3mDz2P19UV0bK1RbZ-25nYQZg@HIDDEN>
 <jwvvbw2euon.fsf-monnier+emacsbugs@HIDDEN>
 <CAFM41H0J7GFE2andkrqR7Tdz2Nm4MPXY20sufUeR_OyyitwS=g@HIDDEN>
 <jwvtxb39fia.fsf-monnier+emacsbugs@HIDDEN>
 <CAFM41H3gjuKz4joOw3eLRoNkbJ43Dh37Kvfhocv-zpkLO8BjHg@HIDDEN>
 <jwvk3byz11x.fsf-monnier+emacsbugs@HIDDEN>
Date: Thu, 13 Mar 2014 10:35:05 -0400
In-Reply-To: <jwvk3byz11x.fsf-monnier+emacsbugs@HIDDEN> (Stefan Monnier's
 message of "Thu, 13 Mar 2014 09:24:28 -0400")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.3 (/)
X-Debbugs-Envelope-To: 16818
Cc: 16818 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.3 (/)

>> 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.
> Can you give an example incorrect adjustment?

Oh, I think I see: with the current code, the mark-ring gets copies of
markers and those copies are made "late", so if you do "C-SPC, some
deletion around point, and then C-SPC", a new marker for the first C-SPC
is pushed on the mark-ring, but the undo-log has an adjustment for
mark-marker rather than for that new marker.

IOW, I think the primitive-undo fix is needed and your fix is also needed.
I think your fix is too risky for the 24.4, tho (IOW, please wait for
the trunk to re-open before installing it).  The primitive-undo fix
should be safe enough for 24.4, so if you want to code this up and
install it, feel free.


        Stefan




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#16818; Package emacs. Full text available.

Message received at 16818 <at> debbugs.gnu.org:


Received: (at 16818) by debbugs.gnu.org; 13 Mar 2014 13:24:34 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Mar 13 09:24:34 2014
Received: from localhost ([127.0.0.1]:35478 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1WO5ce-0004yR-UR
	for submit <at> debbugs.gnu.org; Thu, 13 Mar 2014 09:24:33 -0400
Received: from ironport2-out.teksavvy.com ([206.248.154.181]:26902)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <monnier@HIDDEN>) id 1WO5cb-0004yE-VE
 for 16818 <at> debbugs.gnu.org; Thu, 13 Mar 2014 09:24:30 -0400
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: Av4EABK/CFFMCppy/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLNBIUGA0kiB4GwS2RCgOkeoFegxM
X-IPAS-Result: Av4EABK/CFFMCppy/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLNBIUGA0kiB4GwS2RCgOkeoFegxM
X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="51706833"
Received: from 76-10-154-114.dsl.teksavvy.com (HELO pastel.home)
 ([76.10.154.114])
 by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA;
 13 Mar 2014 09:24:29 -0400
Received: by pastel.home (Postfix, from userid 20848)
 id ED2D76057F; Thu, 13 Mar 2014 09:24:28 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
To: Barry OReilly <gundaetiapo@HIDDEN>
Subject: Re: bug#16818: Acknowledgement (Undo in region after markers in undo
 history relocated)
Message-ID: <jwvk3byz11x.fsf-monnier+emacsbugs@HIDDEN>
References: <CAFM41H0EA=TyArGBMEwDWy5nbHsfmN8Ev77P2QrvmbMHifnmAg@HIDDEN>
 <handler.16818.B.13928481719895.ack <at> debbugs.gnu.org>
 <CAFM41H0dB_qCzwQLQ4g86Qwbt8VnvqYru=yf0TPD9UeL6qsUkQ@HIDDEN>
 <jwv1tyyo06q.fsf-monnier+emacsbugs@HIDDEN>
 <CAFM41H2Q-x8L9jPjUNk=9TJoc3mDz2P19UV0bK1RbZ-25nYQZg@HIDDEN>
 <jwvvbw2euon.fsf-monnier+emacsbugs@HIDDEN>
 <CAFM41H0J7GFE2andkrqR7Tdz2Nm4MPXY20sufUeR_OyyitwS=g@HIDDEN>
 <jwvtxb39fia.fsf-monnier+emacsbugs@HIDDEN>
 <CAFM41H3gjuKz4joOw3eLRoNkbJ43Dh37Kvfhocv-zpkLO8BjHg@HIDDEN>
Date: Thu, 13 Mar 2014 09:24:28 -0400
In-Reply-To: <CAFM41H3gjuKz4joOw3eLRoNkbJ43Dh37Kvfhocv-zpkLO8BjHg@HIDDEN>
 (Barry OReilly's message of "Wed, 12 Mar 2014 21:59:55 -0400")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.3 (/)
X-Debbugs-Envelope-To: 16818
Cc: 16818 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.3 (/)

>> 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.

Not sure in which way what you're saying is different from what I'm saying.
Are we in violent agreement?

> 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.

Can you give an example incorrect adjustment?

>> (creating new markers each time instead)
> My patch actually results in fewer markers created.

Right, I didn't mean that creating new markers is a problem.


        Stefan




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#16818; Package emacs. Full text available.

Message received at 16818 <at> debbugs.gnu.org:


Received: (at 16818) by debbugs.gnu.org; 13 Mar 2014 02:00:00 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Mar 12 22:00:00 2014
Received: from localhost ([127.0.0.1]:35147 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1WNuwB-0006Ht-4b
	for submit <at> debbugs.gnu.org; Wed, 12 Mar 2014 21:59:59 -0400
Received: from mail-ob0-f176.google.com ([209.85.214.176]:44123)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <gundaetiapo@HIDDEN>) id 1WNuw8-0006Hg-UT
 for 16818 <at> debbugs.gnu.org; Wed, 12 Mar 2014 21:59:57 -0400
Received: by mail-ob0-f176.google.com with SMTP id wp18so376977obc.7
 for <16818 <at> debbugs.gnu.org>; Wed, 12 Mar 2014 18:59:55 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=mime-version:in-reply-to:references:date:message-id:subject:from:to
 :cc:content-type;
 bh=9KcqC6kY2Azta+Zzpg/pe0lkmD02U+PPUuxeSyiAX8Q=;
 b=jRix5NBY3dkXqJvlhOLolmgn9GDpJAjXpKWjQFLJmXjlXeqEno7IoFgMqmGV/6pxwu
 kO+yDGvCOzDqCWxF3CfWONPCuEty7Sa4TYV5rJhTIT+CTgXaNmB+Bu3+H6BOL/7R/U2b
 l4ETcOq8fcSPVPYAAsfBqMCs9vbiaxMrQyRHHn6R4PYiugjP+rkBTnN1HFW99OVIQ3yo
 WNz3QXmvikCt82EGwdcHlgU3DPL1fZ9YeYayFpj+z9dd+tUHC/hMt5k4sA5Uz5GfOWVv
 ThBsmjrmFtdG+O3By5nKRCA9cQ47DA8qGLqogBwGxk65aeQNCOqKKZF3WqYwhts1GgYA
 WE4A==
MIME-Version: 1.0
X-Received: by 10.60.77.35 with SMTP id p3mr701689oew.46.1394675995878; Wed,
 12 Mar 2014 18:59:55 -0700 (PDT)
Received: by 10.76.6.44 with HTTP; Wed, 12 Mar 2014 18:59:55 -0700 (PDT)
In-Reply-To: <jwvtxb39fia.fsf-monnier+emacsbugs@HIDDEN>
References: <CAFM41H0EA=TyArGBMEwDWy5nbHsfmN8Ev77P2QrvmbMHifnmAg@HIDDEN>
 <handler.16818.B.13928481719895.ack <at> debbugs.gnu.org>
 <CAFM41H0dB_qCzwQLQ4g86Qwbt8VnvqYru=yf0TPD9UeL6qsUkQ@HIDDEN>
 <jwv1tyyo06q.fsf-monnier+emacsbugs@HIDDEN>
 <CAFM41H2Q-x8L9jPjUNk=9TJoc3mDz2P19UV0bK1RbZ-25nYQZg@HIDDEN>
 <jwvvbw2euon.fsf-monnier+emacsbugs@HIDDEN>
 <CAFM41H0J7GFE2andkrqR7Tdz2Nm4MPXY20sufUeR_OyyitwS=g@HIDDEN>
 <jwvtxb39fia.fsf-monnier+emacsbugs@HIDDEN>
Date: Wed, 12 Mar 2014 21:59:55 -0400
Message-ID: <CAFM41H3gjuKz4joOw3eLRoNkbJ43Dh37Kvfhocv-zpkLO8BjHg@HIDDEN>
Subject: Re: bug#16818: Acknowledgement (Undo in region after markers in undo
 history relocated)
From: Barry OReilly <gundaetiapo@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
Content-Type: multipart/alternative; boundary=047d7b33d2444fa85604f4734fbc
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 16818
Cc: 16818 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

--047d7b33d2444fa85604f4734fbc
Content-Type: text/plain; charset=ISO-8859-1

> 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.

--047d7b33d2444fa85604f4734fbc
Content-Type: text/html; charset=ISO-8859-1

<div dir="ltr">&gt; Thinking more about this, I think this is fixing the symptom, but<br>&gt; not the cause. The cause is that primitive-undo shouldn&#39;t blindly<br>&gt; obey a (MARKER . OFFSET) entry. Instead it should only obey it if<br>
&gt; the marker still points at the corresponding place.<br><br>From what I can tell, the root cause is relocating markers to<br>unrelated locations in the buffer while another part of Emacs still<br>has a reference to it.<br>
<br>Your counter proposal is a step from the root. For instance, the<br>markers within the mark rings will not adjust correctly, whilst with<br>my patch they will.<br><br>I think your proposal sounds good nonetheless. I don&#39;t doubt there are<br>
other markers that could get swept up into the undo history, become<br>relocated, and then annoy users of undo in region.<br><br>&gt; (creating new markers each time instead)<br><br>My patch actually results in fewer markers created.<br>
<br></div>

--047d7b33d2444fa85604f4734fbc--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#16818; Package emacs. Full text available.

Message received at 16818 <at> debbugs.gnu.org:


Received: (at 16818) by debbugs.gnu.org; 12 Mar 2014 23:24:49 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Mar 12 19:24:49 2014
Received: from localhost ([127.0.0.1]:35046 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1WNsW0-0000kl-Js
	for submit <at> debbugs.gnu.org; Wed, 12 Mar 2014 19:24:48 -0400
Received: from ironport2-out.teksavvy.com ([206.248.154.181]:53779)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <monnier@HIDDEN>) id 1WNsVy-0000kd-Qs
 for 16818 <at> debbugs.gnu.org; Wed, 12 Mar 2014 19:24:47 -0400
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: Av4EABK/CFFMCppy/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLNBIUGA0kiB4GwS2NDYN9A6R6gV6DE4FK
X-IPAS-Result: Av4EABK/CFFMCppy/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLNBIUGA0kiB4GwS2NDYN9A6R6gV6DE4FK
X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="51544378"
Received: from 76-10-154-114.dsl.teksavvy.com (HELO ceviche.home)
 ([76.10.154.114])
 by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA;
 12 Mar 2014 19:24:46 -0400
Received: by ceviche.home (Postfix, from userid 20848)
 id BF26B66090; Wed, 12 Mar 2014 19:24:45 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
To: Barry OReilly <gundaetiapo@HIDDEN>
Subject: Re: bug#16818: Acknowledgement (Undo in region after markers in undo
 history relocated)
Message-ID: <jwvtxb39fia.fsf-monnier+emacsbugs@HIDDEN>
References: <CAFM41H0EA=TyArGBMEwDWy5nbHsfmN8Ev77P2QrvmbMHifnmAg@HIDDEN>
 <handler.16818.B.13928481719895.ack <at> debbugs.gnu.org>
 <CAFM41H0dB_qCzwQLQ4g86Qwbt8VnvqYru=yf0TPD9UeL6qsUkQ@HIDDEN>
 <jwv1tyyo06q.fsf-monnier+emacsbugs@HIDDEN>
 <CAFM41H2Q-x8L9jPjUNk=9TJoc3mDz2P19UV0bK1RbZ-25nYQZg@HIDDEN>
 <jwvvbw2euon.fsf-monnier+emacsbugs@HIDDEN>
 <CAFM41H0J7GFE2andkrqR7Tdz2Nm4MPXY20sufUeR_OyyitwS=g@HIDDEN>
Date: Wed, 12 Mar 2014 19:24:45 -0400
In-Reply-To: <CAFM41H0J7GFE2andkrqR7Tdz2Nm4MPXY20sufUeR_OyyitwS=g@HIDDEN>
 (Barry OReilly's message of "Tue, 11 Mar 2014 17:24:25 -0400")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.3 (/)
X-Debbugs-Envelope-To: 16818
Cc: 16818 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.3 (/)

> At the end is a patch to implement this. I wrote the marker-tests to
> make sure I didn't break anything too badly, they pass with or without
> the rest of the patch. The new undo-test-mark-adjustment implements
> the recipe of this bug report. It fails with current trunk and passes
> with the patch.

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.

Your patch works around the problem by trying to avoid moving the mark
(creating new markers each time instead) but that doesn't fix the
problem for the other markers.

Problem is: the undo log format as it stands does not record in
a reliable way what was the marker's position at that time, so it's not
easy to figure out whether the marker is still at the "same place"
or not.

This said, in practice, those (MARKER . OFFSET) entries are only
introduced for text deletion.  So we should normally find them
immediately after a (STRING . POS) and those (MARKER . OFFSET) should
only be applied if that MARKER was at POS before undoing the deletion
of STRING.

IOW, I think the right fix is to change primitive-undo's handling of
(STRING . POS) by first looking at subsequent (MARKER . OFFSET) entries
and dropping those whose MARKER is not currently at POS.

WDYT?


        Stefan




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#16818; Package emacs. Full text available.

Message received at 16818 <at> debbugs.gnu.org:


Received: (at 16818) by debbugs.gnu.org; 11 Mar 2014 21:24:35 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Mar 11 17:24:34 2014
Received: from localhost ([127.0.0.1]:33629 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1WNUA4-0007fL-2a
	for submit <at> debbugs.gnu.org; Tue, 11 Mar 2014 17:24:34 -0400
Received: from mail-oa0-f54.google.com ([209.85.219.54]:33367)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <gundaetiapo@HIDDEN>) id 1WNU9y-0007f7-EP
 for 16818 <at> debbugs.gnu.org; Tue, 11 Mar 2014 17:24:28 -0400
Received: by mail-oa0-f54.google.com with SMTP id n16so9384099oag.27
 for <16818 <at> debbugs.gnu.org>; Tue, 11 Mar 2014 14:24:25 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=mime-version:in-reply-to:references:date:message-id:subject:from:to
 :cc:content-type;
 bh=12zjDy5so2qaetN8liHiRM/TzrNiTKxL/QwG4RAoz2o=;
 b=SPYHJUqrjvtoUyoxK7xcY1i+fPa8XWWToriR4nwtkhoxaMjpaacnzS3Syn0S72vhzi
 B2TLZZdJBlS1tdrNFhXSgSZIaraBGQIMwUtONMPrPEnFZHCfgxzUNyytB4Yd2ojvtKQl
 dmhz8Ovax2OM0fsaGelyYs2lvohYcqXMeJdUX/2FAsJ33GRs9xjqNVtO5B1+UlFJsx6Y
 GUJ2QsWNhMMYlMiAlhuQPMRQSHvFwu/p2GIqwWxEdPcXPz5Cf/6w9T02Hc+gc0u/Jk3K
 9uaDF/yA1DHpgm900z2UlqLvmZ6m+D5olrGxWVysLV289rJT47G7xYAJajBmku3d/XxE
 I0FA==
MIME-Version: 1.0
X-Received: by 10.60.145.225 with SMTP id sx1mr10882653oeb.30.1394573065665;
 Tue, 11 Mar 2014 14:24:25 -0700 (PDT)
Received: by 10.76.6.44 with HTTP; Tue, 11 Mar 2014 14:24:25 -0700 (PDT)
In-Reply-To: <jwvvbw2euon.fsf-monnier+emacsbugs@HIDDEN>
References: <CAFM41H0EA=TyArGBMEwDWy5nbHsfmN8Ev77P2QrvmbMHifnmAg@HIDDEN>
 <handler.16818.B.13928481719895.ack <at> debbugs.gnu.org>
 <CAFM41H0dB_qCzwQLQ4g86Qwbt8VnvqYru=yf0TPD9UeL6qsUkQ@HIDDEN>
 <jwv1tyyo06q.fsf-monnier+emacsbugs@HIDDEN>
 <CAFM41H2Q-x8L9jPjUNk=9TJoc3mDz2P19UV0bK1RbZ-25nYQZg@HIDDEN>
 <jwvvbw2euon.fsf-monnier+emacsbugs@HIDDEN>
Date: Tue, 11 Mar 2014 17:24:25 -0400
Message-ID: <CAFM41H0J7GFE2andkrqR7Tdz2Nm4MPXY20sufUeR_OyyitwS=g@HIDDEN>
Subject: Re: bug#16818: Acknowledgement (Undo in region after markers in undo
 history relocated)
From: Barry OReilly <gundaetiapo@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
Content-Type: multipart/alternative; boundary=047d7b5d485231430d04f45b583f
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 16818
Cc: 16818 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

--047d7b5d485231430d04f45b583f
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

>> What makes more sense to me is that the old value of mark-marker is
>> pushed onto the rings, then a new marker object is created to
>> become the value of mark-marker. Then the marker adjustment records
>> would reference the right markers. Effectively this means the mark
>> would follow the advice of the Elisp manual excerpt above.

> That sounds right. I don't have time to really understand the ins
> and outs, but if you can write an ERT test case for it, we could
> install the change.

At the end is a patch to implement this. I wrote the marker-tests to
make sure I didn't break anything too badly, they pass with or without
the rest of the patch. The new undo-test-mark-adjustment implements
the recipe of this bug report. It fails with current trunk and passes
with the patch.

Of the original symptoms of this bug report, the patch solves:

>> Strangely, the selection mark at BOL moves forward three chars

but not:

>> * Unexpectedly, "aaa" is not reinserted back into the buffer
> is due to the selection mark and another marker occupying their own
> change group in the filtered pending-undo-list, and that change
> group is chosen for the first undo in region.

The selection mark is no longer "in the way" on the pending-undo-list,
but the another marker still is. It only is when the recipe is carried
out manually apparently, because the marker is not there when the
recipe is carried out in the undo-test-mark-adjustment. IOW, the ERT
test passes the same test case that fails when carried out manually.

Debugging the C sources, I find the offending marker in the
pending-undo-list is first created at the following C and Lisp
backtraces:

Obtained 31 stack frames.
./src/emacs [0x52c2b4]
./src/emacs(Fmake_overlay+0xf2) [0x526062]
./src/emacs(Ffuncall+0x371) [0x5729c1]
./src/emacs(exec_byte_code+0x3a5) [0x5a42e5]
./src/emacs(Ffuncall+0x20c) [0x57285c]
./src/emacs(exec_byte_code+0x3a5) [0x5a42e5]
./src/emacs(Ffuncall+0x20c) [0x57285c]
./src/emacs(exec_byte_code+0x3a5) [0x5a42e5]
./src/emacs(Ffuncall+0x20c) [0x57285c]
./src/emacs(eval_sub+0x6a8) [0x572118]
./src/emacs(internal_lisp_condition_case+0x21b) [0x574cbb]
./src/emacs(exec_byte_code+0x12fa) [0x5a523a]
./src/emacs(Ffuncall+0x20c) [0x57285c]
./src/emacs(Fapply+0x2c7) [0x572fe7]
./src/emacs(Ffuncall+0x422) [0x572a72]
./src/emacs(exec_byte_code+0x3a5) [0x5a42e5]
./src/emacs(Ffuncall+0x20c) [0x57285c]
./src/emacs(internal_condition_case_n+0xfe) [0x5713ce]
./src/emacs(safe_call+0x138) [0x463298]
./src/emacs [0x4814f4]
./src/emacs(read_char+0x965) [0x50f3b5]
./src/emacs [0x510bad]
./src/emacs(command_loop_1+0x27e) [0x51267e]
./src/emacs(internal_condition_case+0xda) [0x57101a]
./src/emacs [0x5097ca]
./src/emacs(internal_catch+0xd8) [0x570ef8]
./src/emacs(recursive_edit_1+0x120) [0x508d00]
./src/emacs(Frecursive_edit+0xc7) [0x50a687]
./src/emacs(main+0x8ed) [0x5016ad]
/lib64/libc.so.6(__libc_start_main+0xf4) [0x31cf01d994]
./src/emacs [0x43b369]
  make-overlay(192 193)
  #[1028 "=C3=81=01!=C2=84=1C=C3=82=04=04\=02!=C2=88=C3=83=01=C3=84#=C2=88=
=C3=83=01=C3
=C3=86#=C2=88=C2=89=C2=87=C3=87=01!p=3D=C2=834=C3=88=01!=04=3D=C2=834=C3=89=
=01!=03=3D=C2=84;=C3=8A=01p$=C2=88=C2=87"
[redisplay-unhighlight-region-function overlayp make-overlay overlay-put
window face region overlay-buffer overlay-start overlay-end move-overlay] 9
"

(fn START END WINDOW ROL)"](192 193 #<window 3 on *scratch*> nil)
  redisplay--update-region-highlight(#<window 3 on *scratch*>)
  #[0 "=C3=80=C2=A2=C2=84
=C3=83=C3=84 !=C2=87=C3=80=C2=A2<=C2=84=18=C3=80=C3 =C3=86=C2=89=C3=87#=C2 =
=C2=88 =C2=83\"=C3=88=C3=83=C3=80=C2=A2\"=C2=87=C3=89 =C2 )=C3=8A =C3=80=C2=
=A2=C2=89=C2 S=C2=89@=C2=89=C3=84
=3D=C2=84>=C2=89=03=3D=C2=83E=C3=83=01!=C2=88=C2=82L
=C3=8B=02=C3=8C\"!=C2=88=01A=C2=B6=C2=82=C2=82+=C2=B2=01=C2=87" [((#<window=
 3 on *scratch*>))
highlight-nonselected-windows redisplay-unhighlight-region-function
redisplay--update-region-highlight selected-window window-list-1 nil t mapc
window-minibuffer-p minibuffer-selected-window window-parameter
internal-region-overlay] 7 "

(fn)"]()
  funcall(#[0 "=C3=80=C2=A2=C2=84
=C3=83=C3=84 !=C2=87=C3=80=C2=A2<=C2=84=18=C3=80=C3 =C3=86=C2=89=C3=87#=C2 =
=C2=88 =C2=83\"=C3=88=C3=83=C3=80=C2=A2\"=C2=87=C3=89 =C2 )=C3=8A =C3=80=C2=
=A2=C2=89=C2 S=C2=89@=C2=89=C3=84
=3D=C2=84>=C2=89=03=3D=C2=83E=C3=83=01!=C2=88=C2=82L
=C3=8B=02=C3=8C\"!=C2=88=01A=C2=B6=C2=82=C2=82+=C2=B2=01=C2=87" [((#<window=
 3 on *scratch*>))
highlight-nonselected-windows redisplay-unhighlight-region-function
redisplay--update-region-highlight selected-window window-list-1 nil t mapc
window-minibuffer-p minibuffer-selected-window window-parameter
internal-region-overlay] 7 "

(fn)"])
  redisplay--update-region-highlights((#<window 3 on *scratch*>))
  apply(redisplay--update-region-highlights (#<window 3 on *scratch*>))
  #[128 "=C3=80=C3=81=02\"=C2=88=C3=80=C3=82=02\"=C2=87" [apply redisplay--=
update-region-highlights
ignore nil] 4 nil nil]((#<window 3 on *scratch*>))
  redisplay_internal\ \(C\ function\)()

Following the redisplay code indicated, it looks like the same overlay
object is reused for subsequent region selections. If so, the
explanation is similar as for the mark: the marker of the
internal-region-overlay is the same under eq when "bbb" is selected
and deleted as when the line formerly containing "aaa" is selected
followed by undo in region. The marker adjustment is incorrectly found
because the marker moved, and consequently the "aaa" undo record is
not found. Would the solution be analogous as for the mark: make a new
overlay for each new region selection?

Finally, here's the patch that fixes this problem wrt the mark:

diff --git a/lisp/simple.el b/lisp/simple.el
index f9447b1..5b7970c 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -4399,11 +4399,11 @@ If NO-TMM is non-nil, leave `transient-mark-mode'
alone."
       (setq transient-mark-mode 'lambda))
     (run-hooks 'activate-mark-hook)))

-(defun set-mark (pos)
-  "Set this buffer's mark to POS.  Don't use this function!
-That is to say, don't use this function unless you want
-the user to see that the mark has moved, and you want the previous
-mark position to be lost.
+(defun set-mark (pos-or-marker)
+  "Set this buffer's mark to POS-OR-MARKER.  Don't use this
+function!  That is to say, don't use this function unless you
+want the user to see that the mark has moved, and you want the
+previous mark position to be lost.

 Normally, when a new mark is set, the old one should go on the stack.
 This is why most applications should use `push-mark', not `set-mark'.
@@ -4415,9 +4415,10 @@ To remember a location for internal use in the Lisp
program,
 store it in a Lisp variable.  Example:

    (let ((beg (point))) (forward-line 1) (delete-region beg (point)))."
-
-  (set-marker (mark-marker) pos (current-buffer))
-  (if pos
+  (if (markerp pos-or-marker)
+      (setq mark pos-or-marker)
+    (set-marker (mark-marker) pos-or-marker (current-buffer)))
+  (if pos-or-marker
       (activate-mark 'no-tmm)
     ;; Normally we never clear mark-active except in Transient Mark mode.
     ;; But when we actually clear out the mark value too, we must
@@ -4639,10 +4640,12 @@ purposes.  See the documentation of `set-mark' for
more information.

 In Transient Mark mode, activate mark if optional third arg ACTIVATE
non-nil."
   (unless (null (mark t))
-    (setq mark-ring (cons (copy-marker (mark-marker)) mark-ring))
+    (push (mark-marker) mark-ring)
     (when (> (length mark-ring) mark-ring-max)
-      (move-marker (car (nthcdr mark-ring-max mark-ring)) nil)
+      ;; Remove from mark-ring.  Note that marker may be in
+      ;; global-mark-ring, so don't point it nowhere.
       (setcdr (nthcdr (1- mark-ring-max) mark-ring) nil)))
+  (set-mark (copy-marker (mark-marker)))
   (set-marker (mark-marker) (or location (point)) (current-buffer))
   ;; Now push the mark on the global mark ring.
   (if (and global-mark-ring
@@ -4650,9 +4653,8 @@ In Transient Mark mode, activate mark if optional
third arg ACTIVATE non-nil."
       ;; The last global mark pushed was in this same buffer.
       ;; Don't push another one.
       nil
-    (setq global-mark-ring (cons (copy-marker (mark-marker))
global-mark-ring))
+    (push (mark-marker) global-mark-ring)
     (when (> (length global-mark-ring) global-mark-ring-max)
-      (move-marker (car (nthcdr global-mark-ring-max global-mark-ring))
nil)
       (setcdr (nthcdr (1- global-mark-ring-max) global-mark-ring) nil)))
   (or nomsg executing-kbd-macro (> (minibuffer-depth) 0)
       (message "Mark set"))
@@ -4664,11 +4666,9 @@ In Transient Mark mode, activate mark if optional
third arg ACTIVATE non-nil."
   "Pop off mark ring into the buffer's actual mark.
 Does not set point.  Does nothing if mark ring is empty."
   (when mark-ring
-    (setq mark-ring (nconc mark-ring (list (copy-marker (mark-marker)))))
-    (set-marker (mark-marker) (+ 0 (car mark-ring)) (current-buffer))
-    (move-marker (car mark-ring) nil)
-    (if (null (mark t)) (ding))
-    (setq mark-ring (cdr mark-ring)))
+    (setq mark-ring (nconc mark-ring (list (mark-marker))))
+    (set-mark (pop mark-ring))
+    (if (null (mark t)) (ding)))
   (deactivate-mark))

 (define-obsolete-function-alias
diff --git a/src/buffer.c b/src/buffer.c
index 90c1542..d811515 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -5161,6 +5161,7 @@ init_buffer_once (void)
   bset_abbrev_table (&buffer_defaults, Qnil);
   bset_display_table (&buffer_defaults, Qnil);
   bset_undo_list (&buffer_defaults, Qnil);
+  bset_mark (&buffer_defaults, Qnil);
   bset_mark_active (&buffer_defaults, Qnil);
   bset_file_format (&buffer_defaults, Qnil);
   bset_auto_save_file_format (&buffer_defaults, Qt);
@@ -5219,6 +5220,7 @@ init_buffer_once (void)
   bset_major_mode (&buffer_local_flags, make_number (-1));
   bset_mode_name (&buffer_local_flags, make_number (-1));
   bset_undo_list (&buffer_local_flags, make_number (-1));
+  bset_mark (&buffer_local_flags, make_number (-1));
   bset_mark_active (&buffer_local_flags, make_number (-1));
   bset_point_before_scroll (&buffer_local_flags, make_number (-1));
   bset_file_truename (&buffer_local_flags, make_number (-1));
@@ -6124,6 +6126,9 @@ the changes between two undo boundaries as a single
step to be undone.

 If the value of the variable is t, undo information is not recorded.  */);

+  DEFVAR_PER_BUFFER ("mark", &BVAR (current_buffer, mark), Qnil,
+                    doc: /* The buffer's mark.  */);
+
   DEFVAR_PER_BUFFER ("mark-active", &BVAR (current_buffer, mark_active),
Qnil,
                     doc: /* Non-nil means the mark and region are
currently active in this buffer.  */);

diff --git a/test/automated/marker-tests.el b/test/automated/marker-tests.e=
l
new file mode 100644
index 0000000..87ebf82
--- /dev/null
+++ b/test/automated/marker-tests.el
@@ -0,0 +1,59 @@
+;;; marker-tests.el --- tests for common markers such as the mark -*-
lexical-binding:t -*-
+
+;; Copyright (C) 2014 Free Software Foundation, Inc.
+
+;; This file is part of GNU Emacs.
+
+;; GNU Emacs is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; GNU Emacs is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+
+;;; Commentary:
+
+;;; Code:
+
+(ert-deftest marker-tests-mark-rings ()
+  (let ((buf1 (generate-new-buffer "buf1"))
+        (buf2 (generate-new-buffer "buf2")))
+    (set-buffer buf1)
+    (insert "abcdefg")
+    (push-mark 1)
+    (goto-char 2)
+    (push-mark)
+    (set-buffer buf2)
+    (insert "ABCDEFG")
+    (push-mark)
+    (set-buffer buf1)
+    (pop-global-mark)
+    (should (eq (current-buffer) (marker-buffer (mark-marker))))
+    (should (eq (current-buffer) buf2))
+    (goto-char 3)
+    (pop-mark) ; Shouldn't go anywhere, mark-ring empty
+    (should (=3D 3 (point)))
+    (pop-global-mark)
+    (should (eq (current-buffer) buf1))
+    (push-mark 4)
+    (should (=3D 4 (mark t)))
+    (goto-char 5)
+    (exchange-point-and-mark)
+    (should (=3D 4 (point)))
+    (should (=3D 5 (marker-position (mark-marker))))
+    (pop-mark)
+    (should (=3D 2 (mark t)))
+    (pop-mark)
+    (should (=3D 1 (mark t)))
+    (should (=3D 4 (point)))
+    (should (eq (current-buffer) buf1))))
+
+;;; marker-tests.el ends here
+
+
diff --git a/test/automated/undo-tests.el b/test/automated/undo-tests.el
index 8a963f1..a4ed95e 100644
--- a/test/automated/undo-tests.el
+++ b/test/automated/undo-tests.el
@@ -268,6 +268,46 @@
     (should (string=3D (buffer-string)
                      "This sentence corrupted?aaa"))))

+(ert-deftest undo-test-mark-adjustment ()
+  "Test that the mark's marker adjustment in undo history doesn't
+  obstruct undo in region from finding the correct change group.
+  Demonstrates bug 16818."
+  (with-temp-buffer
+    (buffer-enable-undo)
+    (transient-mark-mode 1)
+    (insert "First line\n")
+    (insert "Second line\n")
+    (undo-boundary)
+
+    (goto-char (point-min))
+    (insert "aaa")
+    (undo-boundary)
+
+    (undo)
+    (undo-boundary)
+
+    (goto-char (point-max))
+    (insert "bbb")
+    (undo-boundary)
+
+    (push-mark (point) t t)
+    (setq mark-active t)
+    (goto-char (- (point) 3))
+    (delete-forward-char 1)
+    (undo-boundary)
+
+    (insert "bbb")
+    (undo-boundary)
+
+    (goto-char (point-min))
+    (push-mark (point) t t)
+    (setq mark-active t)
+    (goto-char (+ (point) 3))
+    (undo)
+    (undo-boundary)
+
+    (should (string=3D (buffer-string) "aaaFirst line\nSecond line\nbbb"))=
))
+
 (defun undo-test-all (&optional interactive)
   "Run all tests for \\[undo]."
   (interactive "p")

--047d7b5d485231430d04f45b583f
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">&gt;&gt; What makes more sense to me is that the old value=
 of mark-marker is<br>&gt;&gt; pushed onto the rings, then a new marker obj=
ect is created to<br>&gt;&gt; become the value of mark-marker. Then the mar=
ker adjustment records<br>
&gt;&gt; would reference the right markers. Effectively this means the mark=
<br>&gt;&gt; would follow the advice of the Elisp manual excerpt above.<br>=
<br>&gt; That sounds right. I don&#39;t have time to really understand the =
ins<br>
&gt; and outs, but if you can write an ERT test case for it, we could<br>&g=
t; install the change.<br><br>At the end is a patch to implement this. I wr=
ote the marker-tests to<br>make sure I didn&#39;t break anything too badly,=
 they pass with or without<br>
the rest of the patch. The new undo-test-mark-adjustment implements<br>the =
recipe of this bug report. It fails with current trunk and passes<br>with t=
he patch.<br><br>Of the original symptoms of this bug report, the patch sol=
ves:<br>
<br>&gt;&gt; Strangely, the selection mark at BOL moves forward three chars=
<br><br>but not:<br><br>&gt;&gt; * Unexpectedly, &quot;aaa&quot; is not rei=
nserted back into the buffer<br>&gt; is due to the selection mark and anoth=
er marker occupying their own<br>
&gt; change group in the filtered pending-undo-list, and that change<br>&gt=
; group is chosen for the first undo in region.<br><br>The selection mark i=
s no longer &quot;in the way&quot; on the pending-undo-list,<br>but the ano=
ther marker still is. It only is when the recipe is carried<br>
out manually apparently, because the marker is not there when the<br>recipe=
 is carried out in the undo-test-mark-adjustment. IOW, the ERT<br>test pass=
es the same test case that fails when carried out manually.<br><br>Debuggin=
g the C sources, I find the offending marker in the<br>
pending-undo-list is first created at the following C and Lisp<br>backtrace=
s:<br><br>Obtained 31 stack frames.<br>./src/emacs [0x52c2b4]<br>./src/emac=
s(Fmake_overlay+0xf2) [0x526062]<br>./src/emacs(Ffuncall+0x371) [0x5729c1]<=
br>
./src/emacs(exec_byte_code+0x3a5) [0x5a42e5]<br>./src/emacs(Ffuncall+0x20c)=
 [0x57285c]<br>./src/emacs(exec_byte_code+0x3a5) [0x5a42e5]<br>./src/emacs(=
Ffuncall+0x20c) [0x57285c]<br>./src/emacs(exec_byte_code+0x3a5) [0x5a42e5]<=
br>
./src/emacs(Ffuncall+0x20c) [0x57285c]<br>./src/emacs(eval_sub+0x6a8) [0x57=
2118]<br>./src/emacs(internal_lisp_condition_case+0x21b) [0x574cbb]<br>./sr=
c/emacs(exec_byte_code+0x12fa) [0x5a523a]<br>./src/emacs(Ffuncall+0x20c) [0=
x57285c]<br>
./src/emacs(Fapply+0x2c7) [0x572fe7]<br>./src/emacs(Ffuncall+0x422) [0x572a=
72]<br>./src/emacs(exec_byte_code+0x3a5) [0x5a42e5]<br>./src/emacs(Ffuncall=
+0x20c) [0x57285c]<br>./src/emacs(internal_condition_case_n+0xfe) [0x5713ce=
]<br>
./src/emacs(safe_call+0x138) [0x463298]<br>./src/emacs [0x4814f4]<br>./src/=
emacs(read_char+0x965) [0x50f3b5]<br>./src/emacs [0x510bad]<br>./src/emacs(=
command_loop_1+0x27e) [0x51267e]<br>./src/emacs(internal_condition_case+0xd=
a) [0x57101a]<br>
./src/emacs [0x5097ca]<br>./src/emacs(internal_catch+0xd8) [0x570ef8]<br>./=
src/emacs(recursive_edit_1+0x120) [0x508d00]<br>./src/emacs(Frecursive_edit=
+0xc7) [0x50a687]<br>./src/emacs(main+0x8ed) [0x5016ad]<br>/lib64/libc.so.6=
(__libc_start_main+0xf4) [0x31cf01d994]<br>
./src/emacs [0x43b369]<br>=A0 make-overlay(192 193)<br>=A0 #[1028 &quot;=C3=
=81=01!=C2=84=1C=C3=82=04=04\=02!=C2=88=C3=83=01=C3=84#=C2=88=C3=83=01=C3=
=85=C3=86#=C2=88=C2=89=C2=87=C3=87=01!p=3D=C2=834=C3=88=01!=04=3D=C2=834=C3=
=89=01!=03=3D=C2=84;=C3=8A=01p$=C2=88=C2=87&quot; [redisplay-unhighlight-re=
gion-function overlayp make-overlay overlay-put window face region overlay-=
buffer overlay-start overlay-end move-overlay] 9 &quot;<br>
<br>(fn START END WINDOW ROL)&quot;](192 193 #&lt;window 3 on *scratch*&gt;=
 nil)<br>=A0 redisplay--update-region-highlight(#&lt;window 3 on *scratch*&=
gt;)<br>=A0 #[0 &quot;=C3=80=C2=A2=C2=84<br>=C3=83=C3=84 !=C2=87=C3=80=C2=
=A2&lt;=C2=84=18=C3=80=C3=85=C3=86=C2=89=C3=87#=C2=A0=C2=88 =C2=83\&quot;=
=C3=88=C3=83=C3=80=C2=A2\&quot;=C2=87=C3=89 =C2=85)=C3=8A =C3=80=C2=A2=C2=
=89=C2=85S=C2=89@=C2=89=C3=84 =3D=C2=84&gt;=C2=89=03=3D=C2=83E=C3=83=01!=C2=
=88=C2=82L<br>
=C3=8B=02=C3=8C\&quot;!=C2=88=01A=C2=B6=C2=82=C2=82+=C2=B2=01=C2=87&quot; [=
((#&lt;window 3 on *scratch*&gt;)) highlight-nonselected-windows redisplay-=
unhighlight-region-function redisplay--update-region-highlight selected-win=
dow window-list-1 nil t mapc window-minibuffer-p minibuffer-selected-window=
 window-parameter internal-region-overlay] 7 &quot;<br>
<br>(fn)&quot;]()<br>=A0 funcall(#[0 &quot;=C3=80=C2=A2=C2=84<br>=C3=83=C3=
=84 !=C2=87=C3=80=C2=A2&lt;=C2=84=18=C3=80=C3=85=C3=86=C2=89=C3=87#=C2=A0=
=C2=88 =C2=83\&quot;=C3=88=C3=83=C3=80=C2=A2\&quot;=C2=87=C3=89 =C2=85)=C3=
=8A =C3=80=C2=A2=C2=89=C2=85S=C2=89@=C2=89=C3=84 =3D=C2=84&gt;=C2=89=03=3D=
=C2=83E=C3=83=01!=C2=88=C2=82L<br>=C3=8B=02=C3=8C\&quot;!=C2=88=01A=C2=B6=
=C2=82=C2=82+=C2=B2=01=C2=87&quot; [((#&lt;window 3 on *scratch*&gt;)) high=
light-nonselected-windows redisplay-unhighlight-region-function redisplay--=
update-region-highlight selected-window window-list-1 nil t mapc window-min=
ibuffer-p minibuffer-selected-window window-parameter internal-region-overl=
ay] 7 &quot;<br>
<br>(fn)&quot;])<br>=A0 redisplay--update-region-highlights((#&lt;window 3 =
on *scratch*&gt;))<br>=A0 apply(redisplay--update-region-highlights (#&lt;w=
indow 3 on *scratch*&gt;))<br>=A0 #[128 &quot;=C3=80=C3=81=02\&quot;=C2=88=
=C3=80=C3=82=02\&quot;=C2=87&quot; [apply redisplay--update-region-highligh=
ts ignore nil] 4 nil nil]((#&lt;window 3 on *scratch*&gt;))<br>
=A0 redisplay_internal\ \(C\ function\)()<br><br>Following the redisplay co=
de indicated, it looks like the same overlay<br>object is reused for subseq=
uent region selections. If so, the<br>explanation is similar as for the mar=
k: the marker of the<br>
internal-region-overlay is the same under eq when &quot;bbb&quot; is select=
ed<br>and deleted as when the line formerly containing &quot;aaa&quot; is s=
elected<br>followed by undo in region. The marker adjustment is incorrectly=
 found<br>
because the marker moved, and consequently the &quot;aaa&quot; undo record =
is<br>not found. Would the solution be analogous as for the mark: make a ne=
w<br>overlay for each new region selection?<br><br>Finally, here&#39;s the =
patch that fixes this problem wrt the mark:<br>
<br>diff --git a/lisp/simple.el b/lisp/simple.el<br>index f9447b1..5b7970c =
100644<br>--- a/lisp/simple.el<br>+++ b/lisp/simple.el<br>@@ -4399,11 +4399=
,11 @@ If NO-TMM is non-nil, leave `transient-mark-mode&#39; alone.&quot;<b=
r>
=A0=A0=A0=A0=A0=A0 (setq transient-mark-mode &#39;lambda))<br>=A0=A0=A0=A0 =
(run-hooks &#39;activate-mark-hook)))<br>=A0<br>-(defun set-mark (pos)<br>-=
=A0 &quot;Set this buffer&#39;s mark to POS.=A0 Don&#39;t use this function=
!<br>-That is to say, don&#39;t use this function unless you want<br>
-the user to see that the mark has moved, and you want the previous<br>-mar=
k position to be lost.<br>+(defun set-mark (pos-or-marker)<br>+=A0 &quot;Se=
t this buffer&#39;s mark to POS-OR-MARKER.=A0 Don&#39;t use this<br>+functi=
on!=A0 That is to say, don&#39;t use this function unless you<br>
+want the user to see that the mark has moved, and you want the<br>+previou=
s mark position to be lost.<br>=A0<br>=A0Normally, when a new mark is set, =
the old one should go on the stack.<br>=A0This is why most applications sho=
uld use `push-mark&#39;, not `set-mark&#39;.<br>
@@ -4415,9 +4415,10 @@ To remember a location for internal use in the Lisp =
program,<br>=A0store it in a Lisp variable.=A0 Example:<br>=A0<br>=A0=A0=A0=
 (let ((beg (point))) (forward-line 1) (delete-region beg (point))).&quot;<=
br>-<br>
-=A0 (set-marker (mark-marker) pos (current-buffer))<br>-=A0 (if pos<br>+=
=A0 (if (markerp pos-or-marker)<br>+=A0=A0=A0=A0=A0 (setq mark pos-or-marke=
r)<br>+=A0=A0=A0 (set-marker (mark-marker) pos-or-marker (current-buffer)))=
<br>+=A0 (if pos-or-marker<br>
=A0=A0=A0=A0=A0=A0 (activate-mark &#39;no-tmm)<br>=A0=A0=A0=A0 ;; Normally =
we never clear mark-active except in Transient Mark mode.<br>=A0=A0=A0=A0 ;=
; But when we actually clear out the mark value too, we must<br>@@ -4639,10=
 +4640,12 @@ purposes.=A0 See the documentation of `set-mark&#39; for more =
information.<br>
=A0<br>=A0In Transient Mark mode, activate mark if optional third arg ACTIV=
ATE non-nil.&quot;<br>=A0=A0 (unless (null (mark t))<br>-=A0=A0=A0 (setq ma=
rk-ring (cons (copy-marker (mark-marker)) mark-ring))<br>+=A0=A0=A0 (push (=
mark-marker) mark-ring)<br>
=A0=A0=A0=A0 (when (&gt; (length mark-ring) mark-ring-max)<br>-=A0=A0=A0=A0=
=A0 (move-marker (car (nthcdr mark-ring-max mark-ring)) nil)<br>+=A0=A0=A0=
=A0=A0 ;; Remove from mark-ring.=A0 Note that marker may be in<br>+=A0=A0=
=A0=A0=A0 ;; global-mark-ring, so don&#39;t point it nowhere.<br>
=A0=A0=A0=A0=A0=A0 (setcdr (nthcdr (1- mark-ring-max) mark-ring) nil)))<br>=
+=A0 (set-mark (copy-marker (mark-marker)))<br>=A0=A0 (set-marker (mark-mar=
ker) (or location (point)) (current-buffer))<br>=A0=A0 ;; Now push the mark=
 on the global mark ring.<br>
=A0=A0 (if (and global-mark-ring<br>@@ -4650,9 +4653,8 @@ In Transient Mark=
 mode, activate mark if optional third arg ACTIVATE non-nil.&quot;<br>=A0=
=A0=A0=A0=A0=A0 ;; The last global mark pushed was in this same buffer.<br>=
=A0=A0=A0=A0=A0=A0 ;; Don&#39;t push another one.<br>
=A0=A0=A0=A0=A0=A0 nil<br>-=A0=A0=A0 (setq global-mark-ring (cons (copy-mar=
ker (mark-marker)) global-mark-ring))<br>+=A0=A0=A0 (push (mark-marker) glo=
bal-mark-ring)<br>=A0=A0=A0=A0 (when (&gt; (length global-mark-ring) global=
-mark-ring-max)<br>-=A0=A0=A0=A0=A0 (move-marker (car (nthcdr global-mark-r=
ing-max global-mark-ring)) nil)<br>
=A0=A0=A0=A0=A0=A0 (setcdr (nthcdr (1- global-mark-ring-max) global-mark-ri=
ng) nil)))<br>=A0=A0 (or nomsg executing-kbd-macro (&gt; (minibuffer-depth)=
 0)<br>=A0=A0=A0=A0=A0=A0 (message &quot;Mark set&quot;))<br>@@ -4664,11 +4=
666,9 @@ In Transient Mark mode, activate mark if optional third arg ACTIVA=
TE non-nil.&quot;<br>
=A0=A0 &quot;Pop off mark ring into the buffer&#39;s actual mark.<br>=A0Doe=
s not set point.=A0 Does nothing if mark ring is empty.&quot;<br>=A0=A0 (wh=
en mark-ring<br>-=A0=A0=A0 (setq mark-ring (nconc mark-ring (list (copy-mar=
ker (mark-marker)))))<br>
-=A0=A0=A0 (set-marker (mark-marker) (+ 0 (car mark-ring)) (current-buffer)=
)<br>-=A0=A0=A0 (move-marker (car mark-ring) nil)<br>-=A0=A0=A0 (if (null (=
mark t)) (ding))<br>-=A0=A0=A0 (setq mark-ring (cdr mark-ring)))<br>+=A0=A0=
=A0 (setq mark-ring (nconc mark-ring (list (mark-marker))))<br>
+=A0=A0=A0 (set-mark (pop mark-ring))<br>+=A0=A0=A0 (if (null (mark t)) (di=
ng)))<br>=A0=A0 (deactivate-mark))<br>=A0<br>=A0(define-obsolete-function-a=
lias<br>diff --git a/src/buffer.c b/src/buffer.c<br>index 90c1542..d811515 =
100644<br>--- a/src/buffer.c<br>
+++ b/src/buffer.c<br>@@ -5161,6 +5161,7 @@ init_buffer_once (void)<br>=A0=
=A0 bset_abbrev_table (&amp;buffer_defaults, Qnil);<br>=A0=A0 bset_display_=
table (&amp;buffer_defaults, Qnil);<br>=A0=A0 bset_undo_list (&amp;buffer_d=
efaults, Qnil);<br>
+=A0 bset_mark (&amp;buffer_defaults, Qnil);<br>=A0=A0 bset_mark_active (&a=
mp;buffer_defaults, Qnil);<br>=A0=A0 bset_file_format (&amp;buffer_defaults=
, Qnil);<br>=A0=A0 bset_auto_save_file_format (&amp;buffer_defaults, Qt);<b=
r>@@ -5219,6 +5220,7 @@ init_buffer_once (void)<br>
=A0=A0 bset_major_mode (&amp;buffer_local_flags, make_number (-1));<br>=A0=
=A0 bset_mode_name (&amp;buffer_local_flags, make_number (-1));<br>=A0=A0 b=
set_undo_list (&amp;buffer_local_flags, make_number (-1));<br>+=A0 bset_mar=
k (&amp;buffer_local_flags, make_number (-1));<br>
=A0=A0 bset_mark_active (&amp;buffer_local_flags, make_number (-1));<br>=A0=
=A0 bset_point_before_scroll (&amp;buffer_local_flags, make_number (-1));<b=
r>=A0=A0 bset_file_truename (&amp;buffer_local_flags, make_number (-1));<br=
>@@ -6124,6 +6126,9 @@ the changes between two undo boundaries as a single =
step to be undone.<br>
=A0<br>=A0If the value of the variable is t, undo information is not record=
ed.=A0 */);<br>=A0<br>+=A0 DEFVAR_PER_BUFFER (&quot;mark&quot;, &amp;BVAR (=
current_buffer, mark), Qnil,<br>+=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=
=A0=A0=A0=A0=A0 doc: /* The buffer&#39;s mark.=A0 */);<br>
+<br>=A0=A0 DEFVAR_PER_BUFFER (&quot;mark-active&quot;, &amp;BVAR (current_=
buffer, mark_active), Qnil,<br>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=
=A0=A0=A0=A0=A0=A0 doc: /* Non-nil means the mark and region are currently =
active in this buffer.=A0 */);<br>=A0<br>diff --git a/test/automated/marker=
-tests.el b/test/automated/marker-tests.el<br>
new file mode 100644<br>index 0000000..87ebf82<br>--- /dev/null<br>+++ b/te=
st/automated/marker-tests.el<br>@@ -0,0 +1,59 @@<br>+;;; marker-tests.el --=
- tests for common markers such as the mark -*- lexical-binding:t -*-<br>
+<br>+;; Copyright (C) 2014 Free Software Foundation, Inc.<br>+<br>+;; This=
 file is part of GNU Emacs.<br>+<br>+;; GNU Emacs is free software: you can=
 redistribute it and/or modify<br>+;; it under the terms of the GNU General=
 Public License as published by<br>
+;; the Free Software Foundation, either version 3 of the License, or<br>+;=
; (at your option) any later version.<br>+<br>+;; GNU Emacs is distributed =
in the hope that it will be useful,<br>+;; but WITHOUT ANY WARRANTY; withou=
t even the implied warranty of<br>
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.=A0 See the<br>+;; =
GNU General Public License for more details.<br>+<br>+;; You should have re=
ceived a copy of the GNU General Public License<br>+;; along with GNU Emacs=
.=A0 If not, see &lt;<a href=3D"http://www.gnu.org/licenses/">http://www.gn=
u.org/licenses/</a>&gt;.<br>
+<br>+;;; Commentary:<br>+<br>+;;; Code:<br>+<br>+(ert-deftest marker-tests=
-mark-rings ()<br>+=A0 (let ((buf1 (generate-new-buffer &quot;buf1&quot;))<=
br>+=A0=A0=A0=A0=A0=A0=A0 (buf2 (generate-new-buffer &quot;buf2&quot;)))<br=
>+=A0=A0=A0 (set-buffer buf1)<br>
+=A0=A0=A0 (insert &quot;abcdefg&quot;)<br>+=A0=A0=A0 (push-mark 1)<br>+=A0=
=A0=A0 (goto-char 2)<br>+=A0=A0=A0 (push-mark)<br>+=A0=A0=A0 (set-buffer bu=
f2)<br>+=A0=A0=A0 (insert &quot;ABCDEFG&quot;)<br>+=A0=A0=A0 (push-mark)<br=
>+=A0=A0=A0 (set-buffer buf1)<br>+=A0=A0=A0 (pop-global-mark)<br>
+=A0=A0=A0 (should (eq (current-buffer) (marker-buffer (mark-marker))))<br>=
+=A0=A0=A0 (should (eq (current-buffer) buf2))<br>+=A0=A0=A0 (goto-char 3)<=
br>+=A0=A0=A0 (pop-mark) ; Shouldn&#39;t go anywhere, mark-ring empty<br>+=
=A0=A0=A0 (should (=3D 3 (point)))<br>
+=A0=A0=A0 (pop-global-mark)<br>+=A0=A0=A0 (should (eq (current-buffer) buf=
1))<br>+=A0=A0=A0 (push-mark 4)<br>+=A0=A0=A0 (should (=3D 4 (mark t)))<br>=
+=A0=A0=A0 (goto-char 5)<br>+=A0=A0=A0 (exchange-point-and-mark)<br>+=A0=A0=
=A0 (should (=3D 4 (point)))<br>+=A0=A0=A0 (should (=3D 5 (marker-position =
(mark-marker))))<br>
+=A0=A0=A0 (pop-mark)<br>+=A0=A0=A0 (should (=3D 2 (mark t)))<br>+=A0=A0=A0=
 (pop-mark)<br>+=A0=A0=A0 (should (=3D 1 (mark t)))<br>+=A0=A0=A0 (should (=
=3D 4 (point)))<br>+=A0=A0=A0 (should (eq (current-buffer) buf1))))<br>+<br=
>+;;; marker-tests.el ends here<br>+<br>
+<br>diff --git a/test/automated/undo-tests.el b/test/automated/undo-tests.=
el<br>index 8a963f1..a4ed95e 100644<br>--- a/test/automated/undo-tests.el<b=
r>+++ b/test/automated/undo-tests.el<br>@@ -268,6 +268,46 @@<br>=A0=A0=A0=
=A0 (should (string=3D (buffer-string)<br>
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 &quot;This =
sentence corrupted?aaa&quot;))))<br>=A0<br>+(ert-deftest undo-test-mark-adj=
ustment ()<br>+=A0 &quot;Test that the mark&#39;s marker adjustment in undo=
 history doesn&#39;t<br>+=A0 obstruct undo in region from finding the corre=
ct change group.<br>
+=A0 Demonstrates bug 16818.&quot;<br>+=A0 (with-temp-buffer<br>+=A0=A0=A0 =
(buffer-enable-undo)<br>+=A0=A0=A0 (transient-mark-mode 1)<br>+=A0=A0=A0 (i=
nsert &quot;First line\n&quot;)<br>+=A0=A0=A0 (insert &quot;Second line\n&q=
uot;)<br>+=A0=A0=A0 (undo-boundary)<br>
+<br>+=A0=A0=A0 (goto-char (point-min))<br>+=A0=A0=A0 (insert &quot;aaa&quo=
t;)<br>+=A0=A0=A0 (undo-boundary)<br>+<br>+=A0=A0=A0 (undo)<br>+=A0=A0=A0 (=
undo-boundary)<br>+<br>+=A0=A0=A0 (goto-char (point-max))<br>+=A0=A0=A0 (in=
sert &quot;bbb&quot;)<br>+=A0=A0=A0 (undo-boundary)<br>
+<br>+=A0=A0=A0 (push-mark (point) t t)<br>+=A0=A0=A0 (setq mark-active t)<=
br>+=A0=A0=A0 (goto-char (- (point) 3))<br>+=A0=A0=A0 (delete-forward-char =
1)<br>+=A0=A0=A0 (undo-boundary)<br>+<br>+=A0=A0=A0 (insert &quot;bbb&quot;=
)<br>+=A0=A0=A0 (undo-boundary)<br>+<br>
+=A0=A0=A0 (goto-char (point-min))<br>+=A0=A0=A0 (push-mark (point) t t)<br=
>+=A0=A0=A0 (setq mark-active t)<br>+=A0=A0=A0 (goto-char (+ (point) 3))<br=
>+=A0=A0=A0 (undo)<br>+=A0=A0=A0 (undo-boundary)<br>+<br>+=A0=A0=A0 (should=
 (string=3D (buffer-string) &quot;aaaFirst line\nSecond line\nbbb&quot;))))=
<br>
+<br>=A0(defun undo-test-all (&amp;optional interactive)<br>=A0=A0 &quot;Ru=
n all tests for \\[undo].&quot;<br>=A0=A0 (interactive &quot;p&quot;)<br><b=
r></div>

--047d7b5d485231430d04f45b583f--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#16818; Package emacs. Full text available.

Message received at 16818 <at> debbugs.gnu.org:


Received: (at 16818) by debbugs.gnu.org; 26 Feb 2014 15:18:15 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Feb 26 10:18:15 2014
Received: from localhost ([127.0.0.1]:41420 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1WIgFT-0008OT-52
	for submit <at> debbugs.gnu.org; Wed, 26 Feb 2014 10:18:15 -0500
Received: from mail-ob0-f182.google.com ([209.85.214.182]:63477)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <gundaetiapo@HIDDEN>) id 1WIgFQ-0008OL-Lr
 for 16818 <at> debbugs.gnu.org; Wed, 26 Feb 2014 10:18:13 -0500
Received: by mail-ob0-f182.google.com with SMTP id uz6so889891obc.41
 for <16818 <at> debbugs.gnu.org>; Wed, 26 Feb 2014 07:18:12 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=mime-version:in-reply-to:references:date:message-id:subject:from:to
 :cc:content-type;
 bh=62I7qJcp8jNQRJPlCzxC7xfMPhZ11mcX0LsZngCP6YA=;
 b=poz5T0igfNec2L49VNzsdw+6pPv02hKLupuAKb3P9ZAy19XQq4cY2U9TWiySppZOsu
 /lLEm/02BXPR1TqwYs6pa0RDUig0+SwYuYFPH2hlWoA7jL84jvLdPjdllPKRrur3bore
 PB+2xJkWv1t2II2oHzf3MmWEmyPBfRiEFMRIuZ1wvPhRguW+V66jPrfsF/Uj6X/rs5Nd
 ick5wbF/PvG3oH4AbnjWbyM9RJ0ExRDbTQr9uN1qc8v5vy5fWJ6cmrgSADlO9KHVEr1I
 N6Xor9mUzIYtSk4S1wZbxYOWe4onsnRdX7dyVLfJHoLVCQcpt9OjdfnR7ZUsBc4Xjxpm
 UPjw==
MIME-Version: 1.0
X-Received: by 10.182.243.138 with SMTP id wy10mr525686obc.83.1393427892099;
 Wed, 26 Feb 2014 07:18:12 -0800 (PST)
Received: by 10.76.21.84 with HTTP; Wed, 26 Feb 2014 07:18:12 -0800 (PST)
In-Reply-To: <jwvvbw2euon.fsf-monnier+emacsbugs@HIDDEN>
References: <CAFM41H0EA=TyArGBMEwDWy5nbHsfmN8Ev77P2QrvmbMHifnmAg@HIDDEN>
 <handler.16818.B.13928481719895.ack <at> debbugs.gnu.org>
 <CAFM41H0dB_qCzwQLQ4g86Qwbt8VnvqYru=yf0TPD9UeL6qsUkQ@HIDDEN>
 <jwv1tyyo06q.fsf-monnier+emacsbugs@HIDDEN>
 <CAFM41H2Q-x8L9jPjUNk=9TJoc3mDz2P19UV0bK1RbZ-25nYQZg@HIDDEN>
 <jwvvbw2euon.fsf-monnier+emacsbugs@HIDDEN>
Date: Wed, 26 Feb 2014 10:18:12 -0500
Message-ID: <CAFM41H2wuVU1goYkfKeP=3Vx6G7fZm__d_pSvWyFF5C4SUB5tQ@HIDDEN>
Subject: Re: bug#16818: Acknowledgement (Undo in region after markers in undo
 history relocated)
From: Barry OReilly <gundaetiapo@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
Content-Type: multipart/alternative; boundary=001a11c2a12087612b04f350b68c
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 16818
Cc: 16818 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

--001a11c2a12087612b04f350b68c
Content-Type: text/plain; charset=ISO-8859-1

> That sounds right. I don't have time to really understand the ins
> and outs, but if you can write an ERT test case for it, we could
> install the change.

Thanks. The doc patch is relevant with or without a fix, so I'll
install that soon if there's no objections.

--001a11c2a12087612b04f350b68c
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">&gt; That sounds right. I don&#39;t have time to really un=
derstand the ins<br>&gt; and outs, but if you can write an ERT test case fo=
r it, we could<br>&gt; install the change.<br><br>Thanks. The doc patch is =
relevant with or without a fix, so I&#39;ll<br>
install that soon if there&#39;s no objections.<br><br></div>

--001a11c2a12087612b04f350b68c--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#16818; Package emacs. Full text available.

Message received at 16818 <at> debbugs.gnu.org:


Received: (at 16818) by debbugs.gnu.org; 25 Feb 2014 21:44:11 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Feb 25 16:44:11 2014
Received: from localhost ([127.0.0.1]:39983 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1WIPnP-0001YD-30
	for submit <at> debbugs.gnu.org; Tue, 25 Feb 2014 16:44:11 -0500
Received: from mercure.iro.umontreal.ca ([132.204.24.67]:56652)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <monnier@HIDDEN>) id 1WIPnJ-0001Xz-LX
 for 16818 <at> debbugs.gnu.org; Tue, 25 Feb 2014 16:44:06 -0500
Received: from hidalgo.iro.umontreal.ca (hidalgo.iro.umontreal.ca
 [132.204.27.50])
 by mercure.iro.umontreal.ca (Postfix) with ESMTP id E7F8D84DE2;
 Tue, 25 Feb 2014 16:44:04 -0500 (EST)
Received: from lechon.iro.umontreal.ca (lechon.iro.umontreal.ca
 [132.204.27.242])
 by hidalgo.iro.umontreal.ca (Postfix) with ESMTP id 3B89B1E5B74;
 Tue, 25 Feb 2014 16:43:32 -0500 (EST)
Received: by lechon.iro.umontreal.ca (Postfix, from userid 20848)
 id 09E0CB4128; Tue, 25 Feb 2014 16:43:31 -0500 (EST)
From: Stefan Monnier <monnier@HIDDEN>
To: Barry OReilly <gundaetiapo@HIDDEN>
Subject: Re: bug#16818: Acknowledgement (Undo in region after markers in undo
 history relocated)
Message-ID: <jwvvbw2euon.fsf-monnier+emacsbugs@HIDDEN>
References: <CAFM41H0EA=TyArGBMEwDWy5nbHsfmN8Ev77P2QrvmbMHifnmAg@HIDDEN>
 <handler.16818.B.13928481719895.ack <at> debbugs.gnu.org>
 <CAFM41H0dB_qCzwQLQ4g86Qwbt8VnvqYru=yf0TPD9UeL6qsUkQ@HIDDEN>
 <jwv1tyyo06q.fsf-monnier+emacsbugs@HIDDEN>
 <CAFM41H2Q-x8L9jPjUNk=9TJoc3mDz2P19UV0bK1RbZ-25nYQZg@HIDDEN>
Date: Tue, 25 Feb 2014 16:43:31 -0500
In-Reply-To: <CAFM41H2Q-x8L9jPjUNk=9TJoc3mDz2P19UV0bK1RbZ-25nYQZg@HIDDEN>
 (Barry OReilly's message of "Mon, 24 Feb 2014 17:46:11 -0500")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-DIRO-MailScanner-Information: Please contact the ISP for more information
X-DIRO-MailScanner: Found to be clean
X-DIRO-MailScanner-SpamCheck: n'est pas un polluriel,
 SpamAssassin (score=-2.82, requis 5, autolearn=not spam,
 ALL_TRUSTED -2.82, MC_TSTLAST 0.00)
X-DIRO-MailScanner-From: monnier@HIDDEN
X-Spam-Status: No
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 16818
Cc: 16818 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)

> What makes more sense to me is that the old value of mark-marker is
> pushed onto the rings, then a new marker object is created to become
> the value of mark-marker. Then the marker adjustment records would
> reference the right markers. Effectively this means the mark would
> follow the advice of the Elisp manual excerpt above.

That sounds right.  I don't have time to really understand the ins and
outs, but if you can write an ERT test case for it, we could install
the change.


        Stefan




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#16818; Package emacs. Full text available.

Message received at 16818 <at> debbugs.gnu.org:


Received: (at 16818) by debbugs.gnu.org; 24 Feb 2014 22:46:21 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Feb 24 17:46:21 2014
Received: from localhost ([127.0.0.1]:38280 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1WI4I0-0002Au-1f
	for submit <at> debbugs.gnu.org; Mon, 24 Feb 2014 17:46:21 -0500
Received: from mail-oa0-f47.google.com ([209.85.219.47]:55744)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <gundaetiapo@HIDDEN>) id 1WI4Hx-0002Ae-48
 for 16818 <at> debbugs.gnu.org; Mon, 24 Feb 2014 17:46:18 -0500
Received: by mail-oa0-f47.google.com with SMTP id h16so2768936oag.6
 for <16818 <at> debbugs.gnu.org>; Mon, 24 Feb 2014 14:46:11 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=mime-version:in-reply-to:references:date:message-id:subject:from:to
 :cc:content-type;
 bh=PvVGn6G571S8zcg9JVeGDT1wQg3V3YM55PzBaMU3orU=;
 b=Y+q5VuqYcbz/aRalP5QA25/5QISAaJUy4h8dpXvgfihmbl+iV1I+4RyefW5XeGT5ig
 Kg1NPmHo9DxSLRUXxaPglSNCScczLOO0joyeRMHWdP+eagt2nm8ZLLXCOLQekv0rh4Pt
 Mzn4730nqjXXDyPAVqri8rO2CaQyMHssnBwcIuYZXrI86UQfYWQ42V2DtiHq75WnTPU9
 f7KT2LIzrdh/AHoH8hu369b77WStsSVa1QF/mjFy3o9bbMjEv2wAopT/ibK27F9XkR2j
 Y3q/MMK4klASvU75RxOgV2DsYBzvGtn9kP7xGn+n8U55yaDKOLgHRlv9wbuPTJPxfmAm
 hOKQ==
MIME-Version: 1.0
X-Received: by 10.60.115.68 with SMTP id jm4mr18394789oeb.45.1393281971300;
 Mon, 24 Feb 2014 14:46:11 -0800 (PST)
Received: by 10.76.21.84 with HTTP; Mon, 24 Feb 2014 14:46:11 -0800 (PST)
In-Reply-To: <jwv1tyyo06q.fsf-monnier+emacsbugs@HIDDEN>
References: <CAFM41H0EA=TyArGBMEwDWy5nbHsfmN8Ev77P2QrvmbMHifnmAg@HIDDEN>
 <handler.16818.B.13928481719895.ack <at> debbugs.gnu.org>
 <CAFM41H0dB_qCzwQLQ4g86Qwbt8VnvqYru=yf0TPD9UeL6qsUkQ@HIDDEN>
 <jwv1tyyo06q.fsf-monnier+emacsbugs@HIDDEN>
Date: Mon, 24 Feb 2014 17:46:11 -0500
Message-ID: <CAFM41H2Q-x8L9jPjUNk=9TJoc3mDz2P19UV0bK1RbZ-25nYQZg@HIDDEN>
Subject: Re: bug#16818: Acknowledgement (Undo in region after markers in undo
 history relocated)
From: Barry OReilly <gundaetiapo@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
Content-Type: multipart/alternative; boundary=089e0115f368f8aea004f32ebc79
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 16818
Cc: 16818 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

--089e0115f368f8aea004f32ebc79
Content-Type: text/plain; charset=ISO-8859-1

> > the general question comes up: how is the undo history meant to
> > know about marker relocations?

> I think the marker adjustment entries in the undo history are
> invalid when a marker is relocated elsewhere. I don't see code to
> deal with that, so how you would like it to happen?

I found the Elisp manual says about moving markers:

  When you do this, be sure you know whether the marker is used
  outside of your program, and, if so, what effects will result from
  moving it--otherwise, confusing things may happen in other parts of
  Emacs.

So if we expand on the guidance as follows:

diff --git a/doc/lispref/markers.texi b/doc/lispref/markers.texi
index 51b87ab..19386d6 100644
--- a/doc/lispref/markers.texi
+++ b/doc/lispref/markers.texi
@@ -344,10 +344,12 @@ specify the insertion type, create them with
insertion type
 @section Moving Marker Positions

   This section describes how to change the position of an existing
-marker.  When you do this, be sure you know whether the marker is used
-outside of your program, and, if so, what effects will result from
-moving it---otherwise, confusing things may happen in other parts of
-Emacs.
+marker.  When you do this, be sure you know how the marker is used
+outside of your program.  For example, moving a marker to an unrelated
+new position can cause undo to later adjust the marker incorrectly.
+Often when you wish to relocate a marker to an unrelated position, it
+is preferable to make a new marker and set the prior one to point
+nowhere.

 @defun set-marker marker position &optional buffer
 This function moves @var{marker} to @var{position}

then we don't need to worry about markers in general, only the
particular offending ones of the recipe.

As I described, one offending marker is the mark-marker. From the
push-mark function:

(defun push-mark (&optional location nomsg activate)
  [...]
    (setq mark-ring (cons (copy-marker (mark-marker)) mark-ring))
  [...]
  (set-marker (mark-marker) (or location (point)) (current-buffer))
  [...]
  (setq global-mark-ring (cons (copy-marker (mark-marker))
global-mark-ring))
  )

Two copies are made and the copies go to the mark-ring and
global-mark-ring. The mark continues to be the same marker object
under eq as before, only mutated. Consequently, not only does undo
adjust a marker it shouldn't have, but it doesn't adjust the copies in
the rings when it should have.

What makes more sense to me is that the old value of mark-marker is
pushed onto the rings, then a new marker object is created to become
the value of mark-marker. Then the marker adjustment records would
reference the right markers. Effectively this means the mark would
follow the advice of the Elisp manual excerpt above.

I welcome your guidance about what the right way to solve this bug is.
Thank you.

--089e0115f368f8aea004f32ebc79
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">&gt; &gt; the general question comes up: how is the undo h=
istory meant to<br>&gt; &gt; know about marker relocations?<br><br>&gt; I t=
hink the marker adjustment entries in the undo history are<br>&gt; invalid =
when a marker is relocated elsewhere. I don&#39;t see code to<br>
&gt; deal with that, so how you would like it to happen?<br><br>I found the=
 Elisp manual says about moving markers:<br><br>&nbsp; When you do this, be=
 sure you know whether the marker is used<br>&nbsp; outside of your program=
, and, if so, what effects will result from<br>
&nbsp; moving it&mdash;otherwise, confusing things may happen in other part=
s of<br>&nbsp; Emacs.<br><br>So if we expand on the guidance as follows:<br=
><br>diff --git a/doc/lispref/markers.texi b/doc/lispref/markers.texi<br>in=
dex 51b87ab..19386d6 100644<br>
--- a/doc/lispref/markers.texi<br>+++ b/doc/lispref/markers.texi<br>@@ -344=
,10 +344,12 @@ specify the insertion type, create them with insertion type<=
br>&nbsp;@section Moving Marker Positions<br>&nbsp;<br>&nbsp;&nbsp; This se=
ction describes how to change the position of an existing<br>
-marker.&nbsp; When you do this, be sure you know whether the marker is use=
d<br>-outside of your program, and, if so, what effects will result from<br=
>-moving it---otherwise, confusing things may happen in other parts of<br>-=
Emacs.<br>
+marker.&nbsp; When you do this, be sure you know how the marker is used<br=
>+outside of your program.&nbsp; For example, moving a marker to an unrelat=
ed<br>+new position can cause undo to later adjust the marker incorrectly.<=
br>+Often when you wish to relocate a marker to an unrelated position, it<b=
r>
+is preferable to make a new marker and set the prior one to point<br>+nowh=
ere.<br>&nbsp;<br>&nbsp;@defun set-marker marker position &amp;optional buf=
fer<br>&nbsp;This function moves @var{marker} to @var{position}<br><br>then=
 we don&#39;t need to worry about markers in general, only the<br>
particular offending ones of the recipe.<br><br>As I described, one offendi=
ng marker is the mark-marker. From the<br>push-mark function:<br><br>(defun=
 push-mark (&amp;optional location nomsg activate)<br>&nbsp; [...]<br>&nbsp=
;&nbsp;&nbsp; (setq mark-ring (cons (copy-marker (mark-marker)) mark-ring))=
<br>
&nbsp; [...]<br>&nbsp; (set-marker (mark-marker) (or location (point)) (cur=
rent-buffer))<br>&nbsp; [...]<br>&nbsp; (setq global-mark-ring (cons (copy-=
marker (mark-marker)) global-mark-ring))<br>&nbsp; )<br><br>Two copies are =
made and the copies go to the mark-ring and<br>
global-mark-ring. The mark continues to be the same marker object<br>under =
eq as before, only mutated. Consequently, not only does undo<br>adjust a ma=
rker it shouldn&#39;t have, but it doesn&#39;t adjust the copies in<br>
the rings when it should have.<br><br>What makes more sense to me is that t=
he old value of mark-marker is<br>pushed onto the rings, then a new marker =
object is created to become<br>the value of mark-marker. Then the marker ad=
justment records would<br>
reference the right markers. Effectively this means the mark would<br>follo=
w the advice of the Elisp manual excerpt above.<br><br>I welcome your guida=
nce about what the right way to solve this bug is.<br>Thank you.<br><br>
</div>

--089e0115f368f8aea004f32ebc79--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#16818; Package emacs. Full text available.

Message received at 16818 <at> debbugs.gnu.org:


Received: (at 16818) by debbugs.gnu.org; 20 Feb 2014 14:39:03 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Feb 20 09:39:03 2014
Received: from localhost ([127.0.0.1]:33208 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1WGUmE-0005hD-Gc
	for submit <at> debbugs.gnu.org; Thu, 20 Feb 2014 09:39:02 -0500
Received: from mail-oa0-f52.google.com ([209.85.219.52]:52092)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <gundaetiapo@HIDDEN>) id 1WGUmA-0005gh-MP
 for 16818 <at> debbugs.gnu.org; Thu, 20 Feb 2014 09:38:59 -0500
Received: by mail-oa0-f52.google.com with SMTP id i4so1873336oah.11
 for <16818 <at> debbugs.gnu.org>; Thu, 20 Feb 2014 06:38:52 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=mime-version:in-reply-to:references:date:message-id:subject:from:to
 :cc:content-type;
 bh=Ab5TlQIbpiG1Ft8vv2bMfD19JbRLya7RUaZ6OtMFl40=;
 b=rpBXa2N4d9ohyCxtcCDRjQGSYPgZMOG+JgHzW6gCr/51S9SQeq9oWwJcTpSp9ezlee
 Ix0hvT34vHFKadwpTS8071k5BPTlzAwCfQzVQVqZi7VEHVi8qawga9ZS3LqRwNf6/6rX
 qgIVjbfRp7LHmYLqH9e1RA6xAVCIaaS+7Oauma9jQ0ueZaJ92T2ncmgZmoHA9fezUj3W
 ZuTasEPdCgAJ4+wofIksHRHYo+O7JnT0Ia4JsSh7YS/1h6gWwVpjZWSQacg3I7w1UmNG
 pFzZt4m2kh7PqwRi6Cc33QM7FqHaHSAEdZX/V18cEMaxMayLuI296SlveOAc0RvjR62t
 2MSQ==
MIME-Version: 1.0
X-Received: by 10.60.123.75 with SMTP id ly11mr1772595oeb.1.1392907132737;
 Thu, 20 Feb 2014 06:38:52 -0800 (PST)
Received: by 10.76.21.84 with HTTP; Thu, 20 Feb 2014 06:38:52 -0800 (PST)
In-Reply-To: <jwv1tyyo06q.fsf-monnier+emacsbugs@HIDDEN>
References: <CAFM41H0EA=TyArGBMEwDWy5nbHsfmN8Ev77P2QrvmbMHifnmAg@HIDDEN>
 <handler.16818.B.13928481719895.ack <at> debbugs.gnu.org>
 <CAFM41H0dB_qCzwQLQ4g86Qwbt8VnvqYru=yf0TPD9UeL6qsUkQ@HIDDEN>
 <jwv1tyyo06q.fsf-monnier+emacsbugs@HIDDEN>
Date: Thu, 20 Feb 2014 09:38:52 -0500
Message-ID: <CAFM41H17+i8O1SUmGLaSFuXTUPPYGpOCTvdo0Sf-hi=iJYaxAw@HIDDEN>
Subject: Re: bug#16818: Acknowledgement (Undo in region after markers in undo
 history relocated)
From: Barry OReilly <gundaetiapo@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
Content-Type: multipart/alternative; boundary=047d7b5d25e4da31f804f2d7760b
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 16818
Cc: 16818 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

--047d7b5d25e4da31f804f2d7760b
Content-Type: text/plain; charset=ISO-8859-1

> I don't see that. It's set *and* read in undo-elt-in-region. Not
> sure exactly what is the purpose, tho.

I found no purpose at all for it.

The more pertinent question is:

> the general question comes up: how is the undo history meant to know
> about marker relocations?

I think the marker adjustment entries in the undo history are invalid
when a marker is relocated elsewhere. I don't see code to deal with
that, so how you would like it to happen?

--047d7b5d25e4da31f804f2d7760b
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">&gt; I don&#39;t see that. It&#39;s set *and* read in undo=
-elt-in-region. Not<br>&gt; sure exactly what is the purpose, tho.<br><br>I=
 found no purpose at all for it.<br><br>The more pertinent question is:<br>
<br>&gt; the general question comes up: how is the undo history meant to kn=
ow<br>&gt; about marker relocations?<br><br>I think the marker adjustment e=
ntries in the undo history are invalid<br>when a marker is relocated elsewh=
ere. I don&#39;t see code to deal with<br>
that, so how you would like it to happen?<br><br></div>

--047d7b5d25e4da31f804f2d7760b--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#16818; Package emacs. Full text available.

Message received at 16818 <at> debbugs.gnu.org:


Received: (at 16818) by debbugs.gnu.org; 20 Feb 2014 04:53:26 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Feb 19 23:53:26 2014
Received: from localhost ([127.0.0.1]:32858 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1WGLdV-0005Mq-Pu
	for submit <at> debbugs.gnu.org; Wed, 19 Feb 2014 23:53:25 -0500
Received: from ironport2-out.teksavvy.com ([206.248.154.181]:59660)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <monnier@HIDDEN>) id 1WGLdU-0005Me-L9
 for 16818 <at> debbugs.gnu.org; Wed, 19 Feb 2014 23:53:24 -0500
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: Av4EABK/CFFLd/o4/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLNBIUGA0kiB4GwS2RCgOIYZwZgV6DFQ
X-IPAS-Result: Av4EABK/CFFLd/o4/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLNBIUGA0kiB4GwS2RCgOIYZwZgV6DFQ
X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="48208325"
Received: from 75-119-250-56.dsl.teksavvy.com (HELO pastel.home)
 ([75.119.250.56])
 by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA;
 19 Feb 2014 23:53:19 -0500
Received: by pastel.home (Postfix, from userid 20848)
 id DBBA56336B; Wed, 19 Feb 2014 23:53:18 -0500 (EST)
From: Stefan Monnier <monnier@HIDDEN>
To: Barry OReilly <gundaetiapo@HIDDEN>
Subject: Re: bug#16818: Acknowledgement (Undo in region after markers in undo
 history relocated)
Message-ID: <jwv1tyyo06q.fsf-monnier+emacsbugs@HIDDEN>
References: <CAFM41H0EA=TyArGBMEwDWy5nbHsfmN8Ev77P2QrvmbMHifnmAg@HIDDEN>
 <handler.16818.B.13928481719895.ack <at> debbugs.gnu.org>
 <CAFM41H0dB_qCzwQLQ4g86Qwbt8VnvqYru=yf0TPD9UeL6qsUkQ@HIDDEN>
Date: Wed, 19 Feb 2014 23:53:18 -0500
In-Reply-To: <CAFM41H0dB_qCzwQLQ4g86Qwbt8VnvqYru=yf0TPD9UeL6qsUkQ@HIDDEN>
 (Barry OReilly's message of "Wed, 19 Feb 2014 18:07:56 -0500")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.3 (/)
X-Debbugs-Envelope-To: 16818
Cc: 16818 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.3 (/)

> Another question: what is the purpose of undo-adjusted-markers?
> simple.el is the only file I found that references it, and it's only
> setting the variable without using it.

I don't see that.  It's set *and* read in undo-elt-in-region.
Not sure exactly what is the purpose, tho.


        Stefan




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#16818; Package emacs. Full text available.

Message received at 16818 <at> debbugs.gnu.org:


Received: (at 16818) by debbugs.gnu.org; 19 Feb 2014 23:08:05 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Feb 19 18:08:05 2014
Received: from localhost ([127.0.0.1]:60767 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1WGGFI-0003z0-Og
	for submit <at> debbugs.gnu.org; Wed, 19 Feb 2014 18:08:05 -0500
Received: from mail-ob0-f175.google.com ([209.85.214.175]:40751)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <gundaetiapo@HIDDEN>) id 1WGGFG-0003yU-3Q
 for 16818 <at> debbugs.gnu.org; Wed, 19 Feb 2014 18:08:02 -0500
Received: by mail-ob0-f175.google.com with SMTP id wn1so1254076obc.6
 for <16818 <at> debbugs.gnu.org>; Wed, 19 Feb 2014 15:07:56 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=mime-version:in-reply-to:references:date:message-id:subject:from:to
 :content-type; bh=3Zk/Q4OJowgGVmpSIPSrcOyQR3L9yaFYXqgpAnAr968=;
 b=kDitY20lWdUVFWepGMD9X2cgZJjLvFv9n8C2GHDD1pGTLBBZUf/Cry7i6kz2gISutb
 TvWlw2HWaixw1dprov8va9krHPEpl3PH+nV057pevjeGcyVtyBmdgFzqCTjo4SlpUs+d
 IyQbGeBci1HGgH8KDXD95jAhRyT/pyTV94YPr2Ln4vgo5xIgCCxUe75/J4k9sZOvsQJq
 YqkBRXwA0O3i9zl3VoyeC4uVFpk0G3PDgigG0+iZOgWXhVpEoso8o9jkIFOjztEKDSmo
 4vYGKdYDdgZ8wwEvuB3+MtwNkLYGa1HYUbsjIFZnBEPFmnIHIbw37lA9kdkRBs7vnBOg
 t9nA==
MIME-Version: 1.0
X-Received: by 10.60.80.137 with SMTP id r9mr33999440oex.30.1392851276344;
 Wed, 19 Feb 2014 15:07:56 -0800 (PST)
Received: by 10.76.21.84 with HTTP; Wed, 19 Feb 2014 15:07:56 -0800 (PST)
In-Reply-To: <handler.16818.B.13928481719895.ack <at> debbugs.gnu.org>
References: <CAFM41H0EA=TyArGBMEwDWy5nbHsfmN8Ev77P2QrvmbMHifnmAg@HIDDEN>
 <handler.16818.B.13928481719895.ack <at> debbugs.gnu.org>
Date: Wed, 19 Feb 2014 18:07:56 -0500
Message-ID: <CAFM41H0dB_qCzwQLQ4g86Qwbt8VnvqYru=yf0TPD9UeL6qsUkQ@HIDDEN>
Subject: Re: bug#16818: Acknowledgement (Undo in region after markers in undo
 history relocated)
From: Barry OReilly <gundaetiapo@HIDDEN>
To: 16818 <at> debbugs.gnu.org
Content-Type: multipart/alternative; boundary=089e013a12f88d329a04f2ca75aa
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 16818
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

--089e013a12f88d329a04f2ca75aa
Content-Type: text/plain; charset=ISO-8859-1

Another question: what is the purpose of undo-adjusted-markers?
simple.el is the only file I found that references it, and it's only
setting the variable without using it.

I found the specialized GC treatment of undo history markers in
compact_undo_list, so merely having references to the markers via
undo-adjusted-markers might be a motivation. But I can't think of a
particular reason for that.

--089e013a12f88d329a04f2ca75aa
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Another question: what is the purpose of undo-adjusted-mar=
kers?<br>simple.el is the only file I found that references it, and it&#39;=
s only<br>setting the variable without using it.<br><br>I found the special=
ized GC treatment of undo history markers in<br>
compact_undo_list, so merely having references to the markers via<br>undo-a=
djusted-markers might be a motivation. But I can&#39;t think of a<br>partic=
ular reason for that.<br><br><br></div>

--089e013a12f88d329a04f2ca75aa--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#16818; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 19 Feb 2014 22:16:11 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Feb 19 17:16:11 2014
Received: from localhost ([127.0.0.1]:60736 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1WGFR4-0002ZW-09
	for submit <at> debbugs.gnu.org; Wed, 19 Feb 2014 17:16:10 -0500
Received: from eggs.gnu.org ([208.118.235.92]:46250)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <gundaetiapo@HIDDEN>) id 1WGFR1-0002Z9-9n
 for submit <at> debbugs.gnu.org; Wed, 19 Feb 2014 17:16:08 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <gundaetiapo@HIDDEN>) id 1WGFQs-0000s8-T8
 for submit <at> debbugs.gnu.org; Wed, 19 Feb 2014 17:16:02 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM,
 HTML_MESSAGE,T_DKIM_INVALID autolearn=disabled version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:55187)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <gundaetiapo@HIDDEN>) id 1WGFQs-0000s2-QP
 for submit <at> debbugs.gnu.org; Wed, 19 Feb 2014 17:15:58 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:47955)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <gundaetiapo@HIDDEN>) id 1WGFQq-0006Lz-5m
 for bug-gnu-emacs@HIDDEN; Wed, 19 Feb 2014 17:15:58 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <gundaetiapo@HIDDEN>) id 1WGFQn-0000r9-Ek
 for bug-gnu-emacs@HIDDEN; Wed, 19 Feb 2014 17:15:56 -0500
Received: from mail-ob0-x234.google.com ([2607:f8b0:4003:c01::234]:46401)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <gundaetiapo@HIDDEN>) id 1WGFQn-0000r1-70
 for bug-gnu-emacs@HIDDEN; Wed, 19 Feb 2014 17:15:53 -0500
Received: by mail-ob0-f180.google.com with SMTP id vb8so825868obc.25
 for <bug-gnu-emacs@HIDDEN>; Wed, 19 Feb 2014 14:15:52 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=mime-version:date:message-id:subject:from:to:content-type;
 bh=ABk073nS4thTkKBquASpYY3o4bgZrcDCVaAAXQoTzaQ=;
 b=BBsRGtIBODpdF/ZXLX5mQdi3yzSQ8lEBO4VVcxjNBuPqEzFJk7+g7xgDZYm6ev2zdL
 EoVUl0pgVJ6Dk9DVDceOEpgg/W8LVQGEKkbGOIiKrH/bjg4ls9fYHlvJLJOj7yyGoBF4
 zk2GJUJFgXOEyVC9bZSfPISwR+H9HvkYkdSL8yHdnzyr6oaTVmqUTLhdexJrLPk3cxRK
 Sbv05NfdpbCosyfCgRi6gOuwTYZGIkb0kUi8gr0Hwl5JZ6b7hX61IS7KWClSFFKXCaNK
 mZ3pRSOjgcEVxeq5maoCzMXz3ghmDPS0sI0EYoOQhgsKl9gbVN9PmpnVY+IgFEJPgg0m
 9CeQ==
MIME-Version: 1.0
X-Received: by 10.182.87.42 with SMTP id u10mr33017984obz.22.1392848152415;
 Wed, 19 Feb 2014 14:15:52 -0800 (PST)
Received: by 10.76.21.84 with HTTP; Wed, 19 Feb 2014 14:15:52 -0800 (PST)
Date: Wed, 19 Feb 2014 17:15:52 -0500
Message-ID: <CAFM41H0EA=TyArGBMEwDWy5nbHsfmN8Ev77P2QrvmbMHifnmAg@HIDDEN>
Subject: Undo in region after markers in undo history relocated
From: Barry OReilly <gundaetiapo@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Content-Type: multipart/alternative; boundary=089e013cba6259e29204f2c9bb69
X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address
 (bad octet value).
X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address
 (bad octet value).
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -4.0 (----)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -4.0 (----)

--089e013cba6259e29204f2c9bb69
Content-Type: text/plain; charset=ISO-8859-1

Strange behavior with the following recipe, using trunk:

  * ./src/emacs -Q
  * Move point up two lines
  * Insert "aaa"
  * Undo
  * Move point down two lines
  * Insert "bbb"
  * Select "bbb" from end to beginning and delete
  * Insert "bbb"
  * Go to line where "aaa" was and select the line from beginning to
    end
  * Undo in region
  * Observe:
    * "Undo in region!" is echoed in the minibuffer
    * Unexpectedly, "aaa" is not reinserted back into the buffer
    * Strangely, the selection mark at BOL moves forward three chars
  * Undo in region again
  * Observe:
    * "aaa" is reinserted, despite selection no longer covering the
      region where "aaa" was

Prior to the first undo in region, buffer-undo-list is:

  (nil (192 . 195) nil (bbb . 192) (#<marker at 141 in *scratch*> . -3)
(#<marker at 192 in *scratch*> . -3) (#<marker at 190 in *scratch*> . -3)
nil (192 . 195) (t . 0) nil (aaa . 141) nil (141 . 144) (t . 0) nil (1 .
192) (t . 0))

And after undo-make-selective-list pending-undo-list becomes:

  (nil (#<marker at 141 in *scratch*> . -3) (#<marker at 190 in *scratch*>
. -3) nil (aaa . 141) nil (141 . 144) nil)

It seems the #<marker at 141 in *scratch*> is the mark used during
selection. When bbb is deleted, the mark is recorded into undo
history, and it's still there when the selection mark has moved to
position 141 before "aaa". So:

> * Unexpectedly, "aaa" is not reinserted back into the buffer

is due to the selection mark and another marker occupying their own
change group in the filtered pending-undo-list, and that change group
is chosen for the first undo in region.

> Strangely, the selection mark at BOL moves forward three chars

is due to the -3 marker adjustment.

> * "aaa" is reinserted, despite selection no longer covering the
    region where "aaa" was

is simply due to pending-undo-list being reused for the second
consecutive undo, unaware that the selection mark was adjusted.

I haven't determined what those other two markers are. But the general
question comes up: how is the undo history meant to know about marker
relocations?

The code in adjust_markers_for_delete indicates markers are only
recorded when they would be in a deleted region or immediately before
it, so I think the only circumstance markers form their own undesired
change group in the pending-undo-list is when recorded markers
were relocated.

--089e013cba6259e29204f2c9bb69
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Strange behavior with the following recipe, using trunk:<b=
r><br>&nbsp; &bull; ./src/emacs -Q<br>&nbsp; &bull; Move point up two lines=
<br>&nbsp; &bull; Insert &quot;aaa&quot;<br>&nbsp; &bull; Undo<br>&nbsp; &b=
ull; Move point down two lines<br>&nbsp; &bull; Insert &quot;bbb&quot;<br>
&nbsp; &bull; Select &quot;bbb&quot; from end to beginning and delete<br>&n=
bsp; &bull; Insert &quot;bbb&quot;<br>&nbsp; &bull; Go to line where &quot;=
aaa&quot; was and select the line from beginning to<br>&nbsp;&nbsp;&nbsp; e=
nd<br>&nbsp; &bull; Undo in region<br>&nbsp; &bull; Observe:<br>
&nbsp;&nbsp;&nbsp; &bull; &quot;Undo in region!&quot; is echoed in the mini=
buffer<br>&nbsp;&nbsp;&nbsp; &bull; Unexpectedly, &quot;aaa&quot; is not re=
inserted back into the buffer<br>&nbsp;&nbsp;&nbsp; &bull; Strangely, the s=
election mark at BOL moves forward three chars<br>&nbsp; &bull; Undo in reg=
ion again<br>
&nbsp; &bull; Observe:<br>&nbsp;&nbsp;&nbsp; &bull; &quot;aaa&quot; is rein=
serted, despite selection no longer covering the<br>&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp; region where &quot;aaa&quot; was<br><br>Prior to the first undo in =
region, buffer-undo-list is:<br><br>&nbsp; (nil (192 . 195) nil (bbb . 192)=
 (#&lt;marker at 141 in *scratch*&gt; . -3) (#&lt;marker at 192 in *scratch=
*&gt; . -3) (#&lt;marker at 190 in *scratch*&gt; . -3) nil (192 . 195) (t .=
 0) nil (aaa . 141) nil (141 . 144) (t . 0) nil (1 . 192) (t . 0))<br>
<br>And after undo-make-selective-list pending-undo-list becomes:<br><br>&n=
bsp; (nil (#&lt;marker at 141 in *scratch*&gt; . -3) (#&lt;marker at 190 in=
 *scratch*&gt; . -3) nil (aaa . 141) nil (141 . 144) nil)<br><br>It seems t=
he #&lt;marker at 141 in *scratch*&gt; is the mark used during<br>
selection. When bbb is deleted, the mark is recorded into undo<br>history, =
and it&#39;s still there when the selection mark has moved to<br>position 1=
41 before &quot;aaa&quot;. So:<br><br>&gt; &bull; Unexpectedly, &quot;aaa&q=
uot; is not reinserted back into the buffer<br>
<br>is due to the selection mark and another marker occupying their own<br>=
change group in the filtered pending-undo-list, and that change group<br>is=
 chosen for the first undo in region.<br><br>&gt; Strangely, the selection =
mark at BOL moves forward three chars<br>
<br>is due to the -3 marker adjustment.<br><br>&gt; &bull; &quot;aaa&quot; =
is reinserted, despite selection no longer covering the<br>&nbsp;&nbsp;&nbs=
p; region where &quot;aaa&quot; was<br><br>is simply due to pending-undo-li=
st being reused for the second<br>
consecutive undo, unaware that the selection mark was adjusted.<br><br>I ha=
ven&#39;t determined what those other two markers are. But the general<br>q=
uestion comes up: how is the undo history meant to know about marker<br>
relocations?<br><br>The code in adjust_markers_for_delete indicates markers=
 are only<br>recorded when they would be in a deleted region or immediately=
 before<br>it, so I think the only circumstance markers form their own unde=
sired<br>
change group in the pending-undo-list is when recorded markers<br>were relo=
cated.<br><br></div>

--089e013cba6259e29204f2c9bb69--




Acknowledgement sent to Barry OReilly <gundaetiapo@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#16818; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Fri, 31 Oct 2014 17:00:04 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.