GNU bug report logs - #15567
Point jumps around madly in XML file when undoing while auto-revert-mode updates buffer

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 Tue, 8 Oct 2013 23:09:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

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


Received: (at 15567) by debbugs.gnu.org; 18 Oct 2013 14:04:21 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Oct 18 10:04:21 2013
Received: from localhost ([127.0.0.1]:57034 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1VXAf7-0005gk-5I
	for submit <at> debbugs.gnu.org; Fri, 18 Oct 2013 10:04:21 -0400
Received: from mail-ob0-f172.google.com ([209.85.214.172]:36632)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <gundaetiapo@HIDDEN>) id 1VXAf2-0005gQ-AM
 for 15567 <at> debbugs.gnu.org; Fri, 18 Oct 2013 10:04:16 -0400
Received: by mail-ob0-f172.google.com with SMTP id vb8so3144765obc.31
 for <15567 <at> debbugs.gnu.org>; Fri, 18 Oct 2013 07:04:10 -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=iaRVtp8ij91lS92S/OrERsHIWHHOGm7mDEVkVKBmGwg=;
 b=ZSZwAyv6vhlGaHu99Vao732AFl/6z+JU95jcBvGgvIC5xpvLZrd7/JSrb5FlzIkVL5
 LykAoQURLgGwzhPcaFaDSGECh4hbj+1K5S4EEk0hk+sZBiRPcD+3b8TY376/pKIvXvbE
 5zDmvSqcE9xqSwtcV0QWNq+fKlR+KKHIynafN0yv9p5mjLUAYr6wSNc24CsUHmQCBtWV
 yXmXN1il3inwosG/HKh/FpibgdMR1LB5SdQLPUSXCdjjnYLfryA94PvNXqG+t3PvL5gn
 0MVhBo9+FxvFDzlO7p/kUuhn5Mx0Bfkp7tcEaxnVkb2fkwIFEnEDF+vPptE0XuqI4XPC
 OIlQ==
MIME-Version: 1.0
X-Received: by 10.182.129.201 with SMTP id ny9mr5029730obb.0.1382105050627;
 Fri, 18 Oct 2013 07:04:10 -0700 (PDT)
Received: by 10.76.156.103 with HTTP; Fri, 18 Oct 2013 07:04:10 -0700 (PDT)
In-Reply-To: <CAFM41H0EoNLsGr7fPpOsk+c8Ke1dV70n8_o=5=N5LETOTwtOrQ@HIDDEN>
References: <CAFM41H2-_4KQ=u-dzHerx6JCu-rPtst75xb2Shy6D_VkoKK7dA@HIDDEN>
 <jwvwqlmzl2d.fsf-monnier+emacsbugs@HIDDEN>
 <CAFM41H0EoNLsGr7fPpOsk+c8Ke1dV70n8_o=5=N5LETOTwtOrQ@HIDDEN>
Date: Fri, 18 Oct 2013 10:04:10 -0400
Message-ID: <CAFM41H0vsQz2iVxVEQb8tbo67Pd8=pymKgtEAyNktKSo=xv1ag@HIDDEN>
Subject: Re: bug#15567: Point jumps around madly in XML file when undoing
 while auto-revert-mode updates buffer
From: Barry OReilly <gundaetiapo@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
Content-Type: multipart/alternative; boundary=089e015366b495c12304e904688a
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 15567
Cc: 15567 <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 (/)

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

Rev 114704 addresses bug 1 described earlier. Leaving this open to
address bug 2.

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

<div dir="ltr">Rev 114704 addresses bug 1 described earlier. Leaving this open to<br>address bug 2.<br><br></div>

--089e015366b495c12304e904688a--




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

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


Received: (at 15567) by debbugs.gnu.org; 10 Oct 2013 14:14:13 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Oct 10 10:14:13 2013
Received: from localhost ([127.0.0.1]:40830 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1VUH0G-0006sT-OQ
	for submit <at> debbugs.gnu.org; Thu, 10 Oct 2013 10:14:13 -0400
Received: from mail-ob0-f170.google.com ([209.85.214.170]:38605)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <gundaetiapo@HIDDEN>) id 1VUH0E-0006sK-07
 for 15567 <at> debbugs.gnu.org; Thu, 10 Oct 2013 10:14:10 -0400
Received: by mail-ob0-f170.google.com with SMTP id gq1so1764164obb.29
 for <15567 <at> debbugs.gnu.org>; Thu, 10 Oct 2013 07:14:09 -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=ji2Q1sPfJ2ObHI3t6sQzrBPclo1M104iVXWQojV/EUw=;
 b=HD1O/+UGSadtJsSFo1VEkELHb2PQtfTvEGbTJPgDKlHVPXHj+B1sCJMoJvFSMhD176
 U60J6WlGtA2fCJ4tJ/7YkAuw9EXqAQezQ28vxrsQTixh0Be6MzBhJ2C+mJqhsVunvbq+
 m9B/7jLKjthdXrejNIDg34e6j9EyHivL0pwqxKGKr/FR6bMjTobRDFcS/4jp0BJe8bSY
 cUAEzdBXLIMjH/dZM+GDkBGbb8ck2F0Tda84nAwTLRgFIxaykE401aZALu1koQBUFgxL
 78Nrv+9bQAn6FvDWfGJjF7gUI4P47Yz62IkN5DX7p4qWdfcachBXE85dQGLOTf6U5pzo
 UzQw==
MIME-Version: 1.0
X-Received: by 10.182.86.69 with SMTP id n5mr255241obz.115.1381414448982; Thu,
 10 Oct 2013 07:14:08 -0700 (PDT)
Received: by 10.76.156.103 with HTTP; Thu, 10 Oct 2013 07:14:08 -0700 (PDT)
In-Reply-To: <jwvwqlmzl2d.fsf-monnier+emacsbugs@HIDDEN>
References: <CAFM41H2-_4KQ=u-dzHerx6JCu-rPtst75xb2Shy6D_VkoKK7dA@HIDDEN>
 <jwvwqlmzl2d.fsf-monnier+emacsbugs@HIDDEN>
Date: Thu, 10 Oct 2013 10:14:08 -0400
Message-ID: <CAFM41H0EoNLsGr7fPpOsk+c8Ke1dV70n8_o=5=N5LETOTwtOrQ@HIDDEN>
Subject: Re: bug#15567: Point jumps around madly in XML file when undoing
 while auto-revert-mode updates buffer
From: Barry OReilly <gundaetiapo@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
Content-Type: multipart/alternative; boundary=089e013d0a6484f23d04e8639db5
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 15567
Cc: 15567 <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 (/)

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

There may be two bugs here:

   1: That the rng-validate-while-idle timer calls input-pending-p
   when point is on an excursion, regardless of what the inner timer
   is. ie another instance of bug 15045.

   2: That there are more than one rng-validate-while-idle timers.

In order to more directly verify bug 2, I ran with this:

diff --git a/lisp/nxml/rng-valid.el b/lisp/nxml/rng-valid.el
index fb8bd03..9fb5a7b 100644
--- a/lisp/nxml/rng-valid.el
+++ b/lisp/nxml/rng-valid.el
@@ -137,6 +137,8 @@ A quick validation validates at most one chunk."

 ;; Global variables

+(defvar rng-validate-timers '())
+
 (defvar rng-validate-timer nil)
 (make-variable-buffer-local 'rng-validate-timer)
 ;; ensure that we can cancel the timer even after a
kill-all-local-variables
@@ -389,6 +391,7 @@ The schema is set like `rng-auto-set-schema'."
       (cancel-timer rng-validate-quick-timer))
     (kill-local-variable 'rng-validate-quick-timer)))

+(require 'cl-lib)
 (defun rng-activate-timers ()
   (unless rng-validate-timer
     (let ((inhibit-quit t))
@@ -401,7 +404,8 @@ The schema is set like `rng-auto-set-schema'."
            (run-with-idle-timer rng-validate-quick-delay
                                 t
                                 'rng-validate-quick-while-idle
-                                (current-buffer))))))
+                                (current-buffer)))
+      (cl-pushnew rng-validate-timer rng-validate-timers))))

 (defun rng-validate-clear ()
   (rng-validate-mode 1 t))
@@ -433,6 +437,7 @@ The schema is set like `rng-auto-set-schema'."
 ;; validation process down.

 (defun rng-validate-while-idle (buffer)
+  (my-msg "DEBUG: size of rng-validate-timers: %s" (length
rng-validate-timers))
   (when (buffer-live-p buffer)         ; bug#13999
     (with-current-buffer buffer
       (if rng-validate-mode

I also have message statements in mode hooks. Here's the output when I
reproduced the issue:

2013-10-10T10:00:11.404643 Inside my-text-mode-hook for buffer
REDACTED_UnitTests_valgrind.xml
2013-10-10T10:00:11.404814 Inside my-nxml-mode-hook for buffer
REDACTED_UnitTests_valgrind.xml
Mark set [2 times]
2013-10-10T10:00:15.717636 DEBUG: size of rng-validate-timers: 1
Mark set [3 times]
Using vacuous schema
2013-10-10T10:00:37.920625 DEBUG: size of rng-validate-timers: 2
2013-10-10T10:00:38.227798 Inside my-text-mode-hook for buffer
REDACTED_UnitTests_valgrind.xml
2013-10-10T10:00:38.227983 Inside my-nxml-mode-hook for buffer
REDACTED_UnitTests_valgrind.xml
user-error: No further undo information
2013-10-10T10:00:43.442746 DEBUG: size of rng-validate-timers: 2
Reverting buffer `REDACTED_UnitTests_valgrind.xml'.
2013-10-10T10:01:01.231729 DEBUG: size of rng-validate-timers: 3
Reverting buffer `REDACTED_UnitTests_valgrind.xml'.
2013-10-10T10:01:11.217973 DEBUG: size of rng-validate-timers: 4
Reverting buffer `REDACTED_UnitTests_valgrind.xml'.
Mark set
2013-10-10T10:01:20.598804 DEBUG: size of rng-validate-timers: 5
2013-10-10T10:01:20.602859 DEBUG: size of rng-validate-timers: 5

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

<div dir=3D"ltr">There may be two bugs here:<br><br>=A0=A0 1: That the rng-=
validate-while-idle timer calls input-pending-p<br>=A0=A0 when point is on =
an excursion, regardless of what the inner timer<br>=A0=A0 is. ie another i=
nstance of bug 15045.<br>
<br>=A0=A0 2: That there are more than one rng-validate-while-idle timers.<=
br><br>In order to more directly verify bug 2, I ran with this:<br><br>diff=
 --git a/lisp/nxml/rng-valid.el b/lisp/nxml/rng-valid.el<br>index fb8bd03..=
9fb5a7b 100644<br>
--- a/lisp/nxml/rng-valid.el<br>+++ b/lisp/nxml/rng-valid.el<br>@@ -137,6 +=
137,8 @@ A quick validation validates at most one chunk.&quot;<br>=A0<br>=
=A0;; Global variables<br>=A0<br>+(defvar rng-validate-timers &#39;())<br>+=
<br>
=A0(defvar rng-validate-timer nil)<br>=A0(make-variable-buffer-local &#39;r=
ng-validate-timer)<br>=A0;; ensure that we can cancel the timer even after =
a kill-all-local-variables<br>@@ -389,6 +391,7 @@ The schema is set like `r=
ng-auto-set-schema&#39;.&quot;<br>
=A0=A0=A0=A0=A0=A0 (cancel-timer rng-validate-quick-timer))<br>=A0=A0=A0=A0=
 (kill-local-variable &#39;rng-validate-quick-timer)))<br>=A0<br>+(require =
&#39;cl-lib)<br>=A0(defun rng-activate-timers ()<br>=A0=A0 (unless rng-vali=
date-timer<br>=A0=A0=A0=A0 (let ((inhibit-quit t))<br>
@@ -401,7 +404,8 @@ The schema is set like `rng-auto-set-schema&#39;.&quot;=
<br>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 (run-with-idle-timer rng-validate-qui=
ck-delay<br>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=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=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 &#39;rng-valid=
ate-quick-while-idle<br>
-=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=
=A0=A0=A0=A0=A0=A0=A0 (current-buffer))))))<br>+=A0=A0=A0=A0=A0=A0=A0=A0=A0=
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 (current=
-buffer)))<br>+=A0=A0=A0=A0=A0 (cl-pushnew rng-validate-timer rng-validate-=
timers))))<br>=A0<br>=A0(defun rng-validate-clear ()<br>=A0=A0 (rng-validat=
e-mode 1 t))<br>
@@ -433,6 +437,7 @@ The schema is set like `rng-auto-set-schema&#39;.&quot;=
<br>=A0;; validation process down.<br>=A0<br>=A0(defun rng-validate-while-i=
dle (buffer)<br>+=A0 (my-msg &quot;DEBUG: size of rng-validate-timers: %s&q=
uot; (length rng-validate-timers)) <br>
=A0=A0 (when (buffer-live-p buffer)=A0=A0=A0=A0=A0=A0=A0=A0 ; bug#13999<br>=
=A0=A0=A0=A0 (with-current-buffer buffer<br>=A0=A0=A0=A0=A0=A0 (if rng-vali=
date-mode<br><br>I also have message statements in mode hooks. Here&#39;s t=
he output when I<br>reproduced the issue:<br>
<br>2013-10-10T10:00:11.404643 Inside my-text-mode-hook for buffer REDACTED=
_UnitTests_valgrind.xml <br>2013-10-10T10:00:11.404814 Inside my-nxml-mode-=
hook for buffer REDACTED_UnitTests_valgrind.xml <br>Mark set [2 times]<br>
2013-10-10T10:00:15.717636 DEBUG: size of rng-validate-timers: 1<br>Mark se=
t [3 times]<br>Using vacuous schema<br>2013-10-10T10:00:37.920625 DEBUG: si=
ze of rng-validate-timers: 2<br>2013-10-10T10:00:38.227798 Inside my-text-m=
ode-hook for buffer REDACTED_UnitTests_valgrind.xml <br>
2013-10-10T10:00:38.227983 Inside my-nxml-mode-hook for buffer REDACTED_Uni=
tTests_valgrind.xml <br>user-error: No further undo information<br>2013-10-=
10T10:00:43.442746 DEBUG: size of rng-validate-timers: 2<br>Reverting buffe=
r `REDACTED_UnitTests_valgrind.xml&#39;.<br>
2013-10-10T10:01:01.231729 DEBUG: size of rng-validate-timers: 3<br>Reverti=
ng buffer `REDACTED_UnitTests_valgrind.xml&#39;.<br>2013-10-10T10:01:11.217=
973 DEBUG: size of rng-validate-timers: 4<br>Reverting buffer `REDACTED_Uni=
tTests_valgrind.xml&#39;.<br>
Mark set<br>2013-10-10T10:01:20.598804 DEBUG: size of rng-validate-timers: =
5<br>2013-10-10T10:01:20.602859 DEBUG: size of rng-validate-timers: 5<br><b=
r></div>

--089e013d0a6484f23d04e8639db5--




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

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


Received: (at 15567) by debbugs.gnu.org; 9 Oct 2013 12:29:20 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Oct 09 08:29:20 2013
Received: from localhost ([127.0.0.1]:37127 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1VTstD-000101-0t
	for submit <at> debbugs.gnu.org; Wed, 09 Oct 2013 08:29:19 -0400
Received: from ironport2-out.teksavvy.com ([206.248.154.182]:42094)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <monnier@HIDDEN>) id 1VTst8-0000zp-Tu
 for 15567 <at> debbugs.gnu.org; Wed, 09 Oct 2013 08:29:16 -0400
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: Av4EABK/CFHO+K8t/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLNAcLFBgNJIgeBgzBIZEKA5cpjVGBXoMT
X-IPAS-Result: Av4EABK/CFHO+K8t/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLNAcLFBgNJIgeBgzBIZEKA5cpjVGBXoMT
X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="35099487"
Received: from 206-248-175-45.dsl.teksavvy.com (HELO pastel.home)
 ([206.248.175.45])
 by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA;
 09 Oct 2013 08:25:30 -0400
Received: by pastel.home (Postfix, from userid 20848)
 id 07B3661337; Wed,  9 Oct 2013 08:29:14 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
To: Barry OReilly <gundaetiapo@HIDDEN>
Subject: Re: bug#15567: Point jumps around madly in XML file when undoing
 while auto-revert-mode updates buffer
Message-ID: <jwvwqlmzl2d.fsf-monnier+emacsbugs@HIDDEN>
References: <CAFM41H2-_4KQ=u-dzHerx6JCu-rPtst75xb2Shy6D_VkoKK7dA@HIDDEN>
Date: Wed, 09 Oct 2013 08:29:13 -0400
In-Reply-To: <CAFM41H2-_4KQ=u-dzHerx6JCu-rPtst75xb2Shy6D_VkoKK7dA@HIDDEN>
 (Barry OReilly's message of "Tue, 8 Oct 2013 19:07:57 -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: 15567
Cc: 15567 <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 (/)

> shortly point jumps to a wrong part of the buffer. If I wait, it jumps
> back and forth every second or two between where I wanted to be and
> elsewhere in the buffer. I ended up killing the buffer and revisiting
> the file to get back to something usable.

> I have been running Emacs with debug statements to walk the specpdl
> stack during redisplay and look for save_excursion_restore markers
> that mismatch current marker at redisplay. See
> http://debbugs.gnu.org/cgi/bugreport.cgi?bug=15045#29 for why and the
> debugging patch. I was spammed with this output:

Thank you very much, this backtrace is very welcome.  Haven't looked at
how best to fix the problem, but at least the problem is clear.


        Stefan




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

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


Received: (at submit) by debbugs.gnu.org; 8 Oct 2013 23:08:09 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Oct 08 19:08:09 2013
Received: from localhost ([127.0.0.1]:36021 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1VTgNs-0005xy-D5
	for submit <at> debbugs.gnu.org; Tue, 08 Oct 2013 19:08:09 -0400
Received: from eggs.gnu.org ([208.118.235.92]:52656)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <gundaetiapo@HIDDEN>) id 1VTgNo-0005xo-Rr
 for submit <at> debbugs.gnu.org; Tue, 08 Oct 2013 19:08:05 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <gundaetiapo@HIDDEN>) id 1VTgNm-0005IQ-HY
 for submit <at> debbugs.gnu.org; Tue, 08 Oct 2013 19:08:04 -0400
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]:44016)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <gundaetiapo@HIDDEN>) id 1VTgNm-0005IM-F4
 for submit <at> debbugs.gnu.org; Tue, 08 Oct 2013 19:08:02 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:54374)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <gundaetiapo@HIDDEN>) id 1VTgNk-0004C5-IR
 for bug-gnu-emacs@HIDDEN; Tue, 08 Oct 2013 19:08:02 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <gundaetiapo@HIDDEN>) id 1VTgNi-0005HK-ED
 for bug-gnu-emacs@HIDDEN; Tue, 08 Oct 2013 19:08:00 -0400
Received: from mail-ob0-x231.google.com ([2607:f8b0:4003:c01::231]:49910)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <gundaetiapo@HIDDEN>) id 1VTgNi-0005HG-7G
 for bug-gnu-emacs@HIDDEN; Tue, 08 Oct 2013 19:07:58 -0400
Received: by mail-ob0-f177.google.com with SMTP id wm4so9498obc.8
 for <bug-gnu-emacs@HIDDEN>; Tue, 08 Oct 2013 16:07:57 -0700 (PDT)
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=6trAZ+RYeNUO4BzQo4ciekeb/sS7h2Yfcd8/kDeIWdY=;
 b=AXl6YOBLcu9y9ZZSmFfJL6ZJ5+8UuD6aUyTrVi9Vn1kPR2I48I/8Cbu3JzWCDUuKS5
 SBAmRjMXzQIOsSVD9wNYKKVtVNk4YwDisCMI9wNtuIsPiKy0SFD4/02Sqz4vRP3GplV0
 Axtzmmm8iqvf6ZH2DtkTkAynRX/wxpHMC7RjUt/bKXB5zPBh26/TU+kkcUVX8aK7NTXt
 8VDOgo4ejRjf1E1sns9PXiHo3TOM1k0UKUSCD2YbAnLo2j/hptAtGnlr5rwa+kLic2j9
 Zs68TgTlfWCdv17kB7T2XqPCy5OQXig+UMksp8636XOZzG6b9h9qH1ztFIiDdQ4KUypw
 OqNA==
MIME-Version: 1.0
X-Received: by 10.60.124.14 with SMTP id me14mr3152864oeb.4.1381273677687;
 Tue, 08 Oct 2013 16:07:57 -0700 (PDT)
Received: by 10.76.156.103 with HTTP; Tue, 8 Oct 2013 16:07:57 -0700 (PDT)
Date: Tue, 8 Oct 2013 19:07:57 -0400
Message-ID: <CAFM41H2-_4KQ=u-dzHerx6JCu-rPtst75xb2Shy6D_VkoKK7dA@HIDDEN>
Subject: Point jumps around madly in XML file when undoing while
 auto-revert-mode updates buffer
From: Barry OReilly <gundaetiapo@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Content-Type: multipart/alternative; boundary=047d7b5d33d4e572c504e842d605
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 (----)

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

I had an XML file open, specifically the XML output file of a Valgrind
run. I ran Valgrind again which caused the XML file to become empty
and populate with new content. Since I wanted to view the old output,
I did undo in Emacs. I navigated to where I wanted to go, but then
shortly point jumps to a wrong part of the buffer. If I wait, it jumps
back and forth every second or two between where I wanted to be and
elsewhere in the buffer. I ended up killing the buffer and revisiting
the file to get back to something usable.

I have been running Emacs with debug statements to walk the specpdl
stack during redisplay and look for save_excursion_restore markers
that mismatch current marker at redisplay. See
http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D15045#29 for why and the
debugging patch. I was spammed with this output:

2013-10-08T18:24:21.068155000|pid:21060|tid:47198260320512|dispnew.c|5807|
DEBUG: Found save_excursion_restore with mismatched point markers
  redisplay()
  sit-for(0)
  rng-validate-while-idle-continue-p()
  rng-do-some-validation-1(rng-validate-while-idle-continue-p)
=CA=1E=C3=8B=C2=8E=C3=8C!.e("=C6 =87" [rng-dt-namespace-context-getter modi=
fied
buffer-undo-list inhibit-read-only inhibit-modification-hooks
deactivate-mark rng-validate-prepare (nxml-ns-get-context)
buffer-modified-p t nil ((byte-code =C1=C2!=88=C2=87" [modified
restore-buffer-modified-p nil] 2)) rng-do-some-validation-1
buffer-file-name buffer-file-truename continue-p-function] 3)
  rng-do-some-validation(rng-validate-while-idle-continue-p)
  rng-validate-while-idle(#<buffer REDACTED_UnitTests_valgrind.xml>)
  apply(rng-validate-while-idle #<buffer REDACTED_UnitTests_valgrind.xml>)
  byte-code("r=C2=C3H\"=88)=C1=87" [timer apply 5 6] 4)
  timer-event-handler([t 0 1 500000 t rng-validate-while-idle (#<buffer
REDACTED_UnitTests_valgrind.xml>) idle 0])
  input-pending-p()
  rng-validate-while-idle-continue-p()
  rng-do-some-validation-1(rng-validate-while-idle-continue-p)
=CA=1E=C3=8B=C2=8E=C3=8C!.e("=C6 =87" [rng-dt-namespace-context-getter modi=
fied
buffer-undo-list inhibit-read-only inhibit-modification-hooks
deactivate-mark rng-validate-prepare (nxml-ns-get-context)
buffer-modified-p t nil ((byte-code =C1=C2!=88=C2=87" [modified
restore-buffer-modified-p nil] 2)) rng-do-some-validation-1
buffer-file-name buffer-file-truename continue-p-function] 3)
  rng-do-some-validation(rng-validate-while-idle-continue-p)
  rng-validate-while-idle(#<buffer REDACTED_UnitTests_valgrind.xml>)
  apply(rng-validate-while-idle #<buffer REDACTED_UnitTests_valgrind.xml>)
  byte-code("r=C2=C3H\"=88)=C1=87" [timer apply 5 6] 4)
  timer-event-handler([t 0 1 500000 t rng-validate-while-idle (#<buffer
REDACTED_UnitTests_valgrind.xml>) idle 0])
#<marker at 591026 in REDACTED_UnitTests_valgrind.xml>#<marker at 152113 in
REDACTED_UnitTests_valgrind.xml>

Normally this debug statement is silent. It indicates redisplay
occurred when point was on an excursion.

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

<div dir=3D"ltr">I had an XML file open, specifically the XML output file o=
f a Valgrind<br>run. I ran Valgrind again which caused the XML file to beco=
me empty<br>and populate with new content. Since I wanted to view the old o=
utput,<br>
I did undo in Emacs. I navigated to where I wanted to go, but then<br>short=
ly point jumps to a wrong part of the buffer. If I wait, it jumps<br>back a=
nd forth every second or two between where I wanted to be and<br>elsewhere =
in the buffer. I ended up killing the buffer and revisiting<br>
the file to get back to something usable.<br><br>I have been running Emacs =
with debug statements to walk the specpdl<br>stack during redisplay and loo=
k for save_excursion_restore markers<br>that mismatch current marker at red=
isplay. See<br>
<a href=3D"http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D15045#29">http://=
debbugs.gnu.org/cgi/bugreport.cgi?bug=3D15045#29</a> for why and the<br>deb=
ugging patch. I was spammed with this output:<br><br>2013-10-08T18:24:21.06=
8155000|pid:21060|tid:47198260320512|dispnew.c|5807| DEBUG: Found save_excu=
rsion_restore with mismatched point markers <br>
=A0 redisplay()<br>=A0 sit-for(0)<br>=A0 rng-validate-while-idle-continue-p=
()<br>=A0 rng-do-some-validation-1(rng-validate-while-idle-continue-p)<br>=
=CA=1E=C3=8B=C2=8E=C3=8C!.e(&quot;=C6 =85=87&quot; [rng-dt-namespace-contex=
t-getter modified buffer-undo-list inhibit-read-only inhibit-modification-h=
ooks deactivate-mark rng-validate-prepare (nxml-ns-get-context) buffer-modi=
fied-p t nil ((byte-code =C1=C2!=88=C2=87&quot; [modified restore-buffer-mo=
dified-p nil] 2)) rng-do-some-validation-1 buffer-file-name buffer-file-tru=
ename continue-p-function] 3)<br>
=A0 rng-do-some-validation(rng-validate-while-idle-continue-p)<br>=A0 rng-v=
alidate-while-idle(#&lt;buffer REDACTED_UnitTests_valgrind.xml&gt;)<br>=A0 =
apply(rng-validate-while-idle #&lt;buffer REDACTED_UnitTests_valgrind.xml&g=
t;)<br>
=A0 byte-code(&quot;r=C2=C3H\&quot;=88)=C1=87&quot; [timer apply 5 6] 4)<br=
>=A0 timer-event-handler([t 0 1 500000 t rng-validate-while-idle (#&lt;buff=
er REDACTED_UnitTests_valgrind.xml&gt;) idle 0])<br>=A0 input-pending-p()<b=
r>=A0 rng-validate-while-idle-continue-p()<br>
=A0 rng-do-some-validation-1(rng-validate-while-idle-continue-p)<br>=CA=1E=
=C3=8B=C2=8E=C3=8C!.e(&quot;=C6 =85=87&quot; [rng-dt-namespace-context-gett=
er modified buffer-undo-list inhibit-read-only inhibit-modification-hooks d=
eactivate-mark rng-validate-prepare (nxml-ns-get-context) buffer-modified-p=
 t nil ((byte-code =C1=C2!=88=C2=87&quot; [modified restore-buffer-modified=
-p nil] 2)) rng-do-some-validation-1 buffer-file-name buffer-file-truename =
continue-p-function] 3)<br>
=A0 rng-do-some-validation(rng-validate-while-idle-continue-p)<br>=A0 rng-v=
alidate-while-idle(#&lt;buffer REDACTED_UnitTests_valgrind.xml&gt;)<br>=A0 =
apply(rng-validate-while-idle #&lt;buffer REDACTED_UnitTests_valgrind.xml&g=
t;)<br>
=A0 byte-code(&quot;r=C2=C3H\&quot;=88)=C1=87&quot; [timer apply 5 6] 4)<br=
>=A0 timer-event-handler([t 0 1 500000 t rng-validate-while-idle (#&lt;buff=
er REDACTED_UnitTests_valgrind.xml&gt;) idle 0])<br>#&lt;marker at 591026 i=
n REDACTED_UnitTests_valgrind.xml&gt;#&lt;marker at 152113 in REDACTED_Unit=
Tests_valgrind.xml&gt;<br>
<br>Normally this debug statement is silent. It indicates redisplay<br>occu=
rred when point was on an excursion.<br><br></div>

--047d7b5d33d4e572c504e842d605--




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#15567; 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.