From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Barry OReilly Newsgroups: gmane.emacs.bugs Subject: bug#15567: Point jumps around madly in XML file when undoing while auto-revert-mode updates buffer Date: Tue, 8 Oct 2013 19:07:57 -0400 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=047d7b5d33d4e572c504e842d605 X-Trace: ger.gmane.org 1381273746 2574 80.91.229.3 (8 Oct 2013 23:09:06 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 8 Oct 2013 23:09:06 +0000 (UTC) To: 15567@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Oct 09 01:09:10 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VTgOs-00081i-1R for geb-bug-gnu-emacs@m.gmane.org; Wed, 09 Oct 2013 01:09:10 +0200 Original-Received: from localhost ([::1]:39318 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VTgOr-0004IO-4W for geb-bug-gnu-emacs@m.gmane.org; Tue, 08 Oct 2013 19:09:09 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54494) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VTgOm-0004I7-U4 for bug-gnu-emacs@gnu.org; Tue, 08 Oct 2013 19:09:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VTgOl-0005SP-Dl for bug-gnu-emacs@gnu.org; Tue, 08 Oct 2013 19:09:04 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:55961) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VTgOl-0005SI-B0 for bug-gnu-emacs@gnu.org; Tue, 08 Oct 2013 19:09:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1VTgOk-0005zO-Ar for bug-gnu-emacs@gnu.org; Tue, 08 Oct 2013 19:09:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Barry OReilly Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 08 Oct 2013 23:09:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 15567 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.138127368922943 (code B ref -1); Tue, 08 Oct 2013 23:09:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 8 Oct 2013 23:08:09 +0000 Original-Received: from localhost ([127.0.0.1]:36021 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VTgNs-0005xy-D5 for submit@debbugs.gnu.org; Tue, 08 Oct 2013 19:08:09 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:52656) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VTgNo-0005xo-Rr for submit@debbugs.gnu.org; Tue, 08 Oct 2013 19:08:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VTgNm-0005IQ-HY for submit@debbugs.gnu.org; Tue, 08 Oct 2013 19:08:04 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:44016) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VTgNm-0005IM-F4 for submit@debbugs.gnu.org; Tue, 08 Oct 2013 19:08:02 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54374) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VTgNk-0004C5-IR for bug-gnu-emacs@gnu.org; Tue, 08 Oct 2013 19:08:02 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VTgNi-0005HK-ED for bug-gnu-emacs@gnu.org; Tue, 08 Oct 2013 19:08:00 -0400 Original-Received: from mail-ob0-x231.google.com ([2607:f8b0:4003:c01::231]:49910) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VTgNi-0005HG-7G for bug-gnu-emacs@gnu.org; Tue, 08 Oct 2013 19:07:58 -0400 Original-Received: by mail-ob0-f177.google.com with SMTP id wm4so9498obc.8 for ; 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== X-Received: by 10.60.124.14 with SMTP id me14mr3152864oeb.4.1381273677687; Tue, 08 Oct 2013 16:07:57 -0700 (PDT) Original-Received: by 10.76.156.103 with HTTP; Tue, 8 Oct 2013 16:07:57 -0700 (PDT) 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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:79067 Archived-At: --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(#) apply(rng-validate-while-idle #) 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 (#) 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(#) apply(rng-validate-while-idle #) 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 (#) idle 0]) ## 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
I had an XML file open, specifically the XML output file o= f a Valgrind
run. I ran Valgrind again which caused the XML file to beco= me empty
and populate with new content. Since I wanted to view the old o= utput,
I did undo in Emacs. I navigated to where I wanted to go, but then
short= ly point jumps to a wrong part of the buffer. If I wait, it jumps
back a= nd 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 loo= k for save_excursion_restore markers
that mismatch current marker at red= isplay. See
http://= debbugs.gnu.org/cgi/bugreport.cgi?bug=3D15045#29 for why and the
deb= ugging patch. I was spammed with this output:

2013-10-08T18:24:21.06= 8155000|pid:21060|tid:47198260320512|dispnew.c|5807| DEBUG: Found save_excu= rsion_restore with mismatched point markers
=A0 redisplay()
=A0 sit-for(0)
=A0 rng-validate-while-idle-continue-p= ()
=A0 rng-do-some-validation-1(rng-validate-while-idle-continue-p)
= =CA=1E=C3=8B=C2=8E=C3=8C!.e("=C6 =85=87" [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" [modified restore-buffer-mo= dified-p nil] 2)) rng-do-some-validation-1 buffer-file-name buffer-file-tru= ename continue-p-function] 3)
=A0 rng-do-some-validation(rng-validate-while-idle-continue-p)
=A0 rng-v= alidate-while-idle(#<buffer REDACTED_UnitTests_valgrind.xml>)
=A0 = apply(rng-validate-while-idle #<buffer REDACTED_UnitTests_valgrind.xml&g= t;)
=A0 byte-code("r=C2=C3H\"=88)=C1=87" [timer apply 5 6] 4)=A0 timer-event-handler([t 0 1 500000 t rng-validate-while-idle (#<buff= er REDACTED_UnitTests_valgrind.xml>) idle 0])
=A0 input-pending-p()=A0 rng-validate-while-idle-continue-p()
=A0 rng-do-some-validation-1(rng-validate-while-idle-continue-p)
=CA=1E= =C3=8B=C2=8E=C3=8C!.e("=C6 =85=87" [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" [modified restore-buffer-modified= -p nil] 2)) rng-do-some-validation-1 buffer-file-name buffer-file-truename = continue-p-function] 3)
=A0 rng-do-some-validation(rng-validate-while-idle-continue-p)
=A0 rng-v= alidate-while-idle(#<buffer REDACTED_UnitTests_valgrind.xml>)
=A0 = apply(rng-validate-while-idle #<buffer REDACTED_UnitTests_valgrind.xml&g= t;)
=A0 byte-code("r=C2=C3H\"=88)=C1=87" [timer apply 5 6] 4)=A0 timer-event-handler([t 0 1 500000 t rng-validate-while-idle (#<buff= er REDACTED_UnitTests_valgrind.xml>) idle 0])
#<marker at 591026 i= n REDACTED_UnitTests_valgrind.xml>#<marker at 152113 in REDACTED_Unit= Tests_valgrind.xml>

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

--047d7b5d33d4e572c504e842d605--