GNU bug report logs - #5620
23.1.92.1; next-error no longer takes into account buffer modifications

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: Paul Pogonyshev <pogonyshev@HIDDEN>; Keywords: moreinfo; merged with #7351; dated Mon, 22 Feb 2010 16:19:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.
Added tag(s) moreinfo. Request was from Lars Ingebrigtsen <larsi@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

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


Received: (at 5620) by debbugs.gnu.org; 4 Dec 2021 21:00:32 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Dec 04 16:00:32 2021
Received: from localhost ([127.0.0.1]:55259 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mtc92-0004Mc-6Y
	for submit <at> debbugs.gnu.org; Sat, 04 Dec 2021 16:00:32 -0500
Received: from quimby.gnus.org ([95.216.78.240]:41232)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1mtc90-0004FI-5m
 for 5620 <at> debbugs.gnu.org; Sat, 04 Dec 2021 16:00:30 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
 s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:
 References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:
 Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:
 Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=3EArZioE9mxWZbxyaOp0lOI2c5qzTCaYD1W5R4w+3CM=; b=lBgrXr87HV0t0XePCg4kN/mJ3t
 UAtPwmEnDLJOvcs/EcT3k5GabPNGxtJKUA45a5mG4MK7h8YWjGfm26YE14gjVJvAIsTBE3a9QGpbG
 5k13y2XLBoot0UpcxOYmqjIZLNP3oq0xe0pyBUDfdUMDmDXhIG0TX9ov5JtNEHC3GziY=;
Received: from [84.212.220.105] (helo=xo)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1mtc8r-0000RO-1O; Sat, 04 Dec 2021 22:00:23 +0100
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Paul Pogonyshev <p.pogonyshev@HIDDEN>
Subject: Re: bug#5620: 23.1.92.1; next-error no longer takes into account
 buffer modifications
References: <201004281805.58350.p.pogonyshev@HIDDEN>
X-Now-Playing: King Crimson's _USA_: "Exiles"
Date: Sat, 04 Dec 2021 22:00:20 +0100
In-Reply-To: <201004281805.58350.p.pogonyshev@HIDDEN> (Paul Pogonyshev's
 message of "Wed, 28 Apr 2010 18:05:58 +0300")
Message-ID: <87a6hg2ihn.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 Content preview: Paul Pogonyshev <p.pogonyshev@HIDDEN> writes: > I
 wonder
 if the supposed fix was checked at all. It fixes neither the > original test
 case in the bug report, nor compilation error messages. (I'm going through
 old bug reports that unfortunately weren't resolved at the time.) 
 Content analysis details:   (-2.9 points, 5.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
 [score: 0.0000]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 5620
Cc: 5620 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://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: <https://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: -3.3 (---)

Paul Pogonyshev <p.pogonyshev@HIDDEN> writes:

> I wonder if the supposed fix was checked at all.  It fixes neither the
> original test case in the bug report, nor compilation error messages.

(I'm going through old bug reports that unfortunately weren't resolved
at the time.)

The problem (as demonstrated by the original test case) is still present
in Emacs to this day.  But it does seem to work sometimes, in my vague
recollection?  Let's see...

Right, this is supposed to work by setting markers in the buffers where
you have the hits, so if you change the buffer in a way that doesn't
make the markers move, then you'll get the wrong line.

In this case:

foo
bar
baz

The marker is a 9, the start of the "baz" line.  Then we yank two lines:

foo
bar
spam
ham
baz

But this doesn't make the "baz" marker move -- we're inserting before
that marker.

So I'm not sure how this could be fixed in general, as this is just the
way markers work.  We could set the marker on the second char of the
line, perhaps, and that'd be marginally less likely to have this effect
(since people commonly insert new lines), but that seems like a pretty
gross hack.

So I don't know what, if anything, could be done here.  Anybody?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#5620; Package emacs. Full text available.
Merged 5620 7351. Request was from Glenn Morris <rgm@HIDDEN> to control <at> debbugs.gnu.org. Full text available.
Did not alter fixed versions and reopened. Request was from Debbugs Internal Request <help-debbugs@HIDDEN> to internal_control <at> debbugs.gnu.org. Full text available.
bug unarchived. Request was from Paul Pogonyshev <p.pogonyshev@HIDDEN> to control <at> debbugs.gnu.org. Full text available.
bug archived. Request was from Debbugs Internal Request <help-debbugs@HIDDEN> to internal_control <at> debbugs.gnu.org. Full text available.
bug closed, send any further explanations to Paul Pogonyshev <pogonyshev@HIDDEN> Request was from Chong Yidong <cyd@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

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


Received: (at 5620) by debbugs.gnu.org; 23 Mar 2010 18:35:50 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Mar 23 14:35:50 2010
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Nu8xB-0008C7-3h
	for submit <at> debbugs.gnu.org; Tue, 23 Mar 2010 14:35:49 -0400
Received: from mail-gy0-f172.google.com ([209.85.160.172])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <sam.steingold@HIDDEN>) id 1Nu8ms-00087c-SV
	for 5620 <at> debbugs.gnu.org; Tue, 23 Mar 2010 14:25:11 -0400
Received: by gyh4 with SMTP id 4so3286519gyh.3
	for <5620 <at> debbugs.gnu.org>; Tue, 23 Mar 2010 11:25:06 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:mime-version:sender:received:date
	:x-google-sender-auth:message-id:subject:from:to:content-type;
	bh=gu3kYXH6K4cn+jTLCLLg3OFpQp9d2JfCdJSBX5krxhE=;
	b=sgGC4NpC87KLIZ6ltbBsHUTsXWcc8lWWlMSVQ6NjfyS0wNfwB/PFQ4KDpvCX1/h89j
	qskgGFQq8DeyyEi3s0RUuE6o3HTdAm/E9R4GmEbRCP/RKaiMsKY/IURsmKTFoTyc12dn
	fbPQWdxLZkLfNb7nheUQ7kvbz0iIIqce6pJdQ=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=mime-version:sender:date:x-google-sender-auth:message-id:subject
	:from:to:content-type;
	b=j8XVt8u+b7+zS9IVOws0DYgt/J41jvZTdH0Gz7IFGO6o1qYiWN87Cvf9o2K/yLQ4i+
	vV94YiTchUFsXaRN5rVH98U1Z4XU2jdNcOkKzARxlkSCF76ulhTLk9dgCDkkF2OYMBu+
	Wf4uNFNyWYdgHuYAaE0zvWNrX6inCpKq2qN4I=
MIME-Version: 1.0
Received: by 10.150.128.6 with SMTP id a6mr9768356ybd.281.1269368705856; Tue, 
	23 Mar 2010 11:25:05 -0700 (PDT)
Date: Tue, 23 Mar 2010 14:25:05 -0400
X-Google-Sender-Auth: 4e8ba998eba28fe0
Message-ID: <1f77704b1003231125h4a7fc3afjb1fd173b95ff3605@HIDDEN>
Subject: bug fixed in revno: 99732
From: Sam Steingold <sds@HIDDEN>
To: 5620 <at> debbugs.gnu.org
Content-Type: text/plain; charset=UTF-8
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 5620
X-Mailman-Approved-At: Tue, 23 Mar 2010 14:35:47 -0400
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
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/pipermail/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>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -1.3 (-)

bug fixed in

revno: 99732
committer: Sam Steingold <sds@HIDDEN>
branch nick: trunk
timestamp: Tue 2010-03-23 14:22:46 -0400
message:
  Fix bug#5620: recalculate all markers on compilation buffer
  modifications, not on file modifications.
  (buffer-modtime): New buffer-local variable:
  the buffer modification time, for buffers not associated with files.
  (compilation-mode): Create it.
  (compilation-filter): Update it.
  (compilation-next-error-function): Use it instead of
  `visited-file-modtime' for timestamp.

-- 
Sam Steingold <http://sds.podval.org>




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN:
bug#5620; Package emacs. Full text available.
Severity set to 'wishlist' from 'normal' Request was from Glenn Morris <rgm@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

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


Received: (at submit) by debbugs.gnu.org; 22 Feb 2010 16:18:32 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Feb 22 11:18:32 2010
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1NjazP-00028j-JP
	for submit <at> debbugs.gnu.org; Mon, 22 Feb 2010 11:18:32 -0500
Received: from fencepost.gnu.org ([140.186.70.10])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <pogonyshev@HIDDEN>) id 1NjaXo-0001n0-IZ
	for submit <at> debbugs.gnu.org; Mon, 22 Feb 2010 10:50:00 -0500
Received: from mail.gnu.org ([199.232.76.166]:52678 helo=mx10.gnu.org)
	by fencepost.gnu.org with esmtp (Exim 4.69)
	(envelope-from <pogonyshev@HIDDEN>) id 1NjaXj-0006WL-Or
	for submit <at> debbugs.gnu.org; Mon, 22 Feb 2010 10:49:55 -0500
Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim
	4.60) (envelope-from <pogonyshev@HIDDEN>) id 1NjaXj-00078M-0s
	for submit <at> debbugs.gnu.org; Mon, 22 Feb 2010 10:49:55 -0500
X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on monty-python
X-Spam-Level: ****
X-Spam-Status: No, score=4.4 required=5.0 tests=AWL,BAYES_00,RCVD_IN_XBL,
	UNPARSEABLE_RELAY autolearn=no version=3.1.0
Received: from lists.gnu.org ([199.232.76.165]:34964)
	by monty-python.gnu.org with esmtps
	(TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60)
	(envelope-from <pogonyshev@HIDDEN>) id 1NjaXi-00078G-SR
	for submit <at> debbugs.gnu.org; Mon, 22 Feb 2010 10:49:54 -0500
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1NjaXi-0008Mq-FN
	for bug-gnu-emacs@HIDDEN; Mon, 22 Feb 2010 10:49:54 -0500
Received: from [140.186.70.92] (port=56687 helo=eggs.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1NjaXh-0008ME-H6
	for bug-gnu-emacs@HIDDEN; Mon, 22 Feb 2010 10:49:54 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69)
	(envelope-from <pogonyshev@HIDDEN>) id 1NjaXg-0005XE-VU
	for bug-gnu-emacs@HIDDEN; Mon, 22 Feb 2010 10:49:53 -0500
Received: from mail.gmx.net ([213.165.64.20]:44853)
	by eggs.gnu.org with smtp (Exim 4.69)
	(envelope-from <pogonyshev@HIDDEN>) id 1NjaXg-0005X0-H6
	for bug-gnu-emacs@HIDDEN; Mon, 22 Feb 2010 10:49:52 -0500
Received: (qmail invoked by alias); 22 Feb 2010 15:49:50 -0000
Received: from unknown (EHLO gonzo.localnet) [91.149.173.2]
	by mail.gmx.net (mp030) with SMTP; 22 Feb 2010 16:49:50 +0100
X-Authenticated: #16844820
X-Provags-ID: V01U2FsdGVkX1+iDX1+lbKi1TGN9/asqYfY+nlKi/LdWWJzpnk2dd
	w3dgh56gK383hd
From: Paul Pogonyshev <pogonyshev@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 23.1.92.1;
	next-error no longer takes into account buffer modifications
Date: Mon, 22 Feb 2010 17:48:38 +0200
User-Agent: KMail/1.12.4 (Linux/2.6.29-2-686; KDE/4.3.4; i686; ; )
MIME-Version: 1.0
Content-Type: Text/Plain;
  charset="us-ascii"
Content-Transfer-Encoding: 7bit
Message-Id: <201002221748.38848.pogonyshev@HIDDEN>
X-Y-GMX-Trusted: 0
X-FuHaFi: 0.59999999999999998
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6,
	seldom 2.4 (older, 4)
X-Spam-Score: -2.0 (--)
X-Debbugs-Envelope-To: submit
X-Mailman-Approved-At: Mon, 22 Feb 2010 11:18:28 -0500
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
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/pipermail/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>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -2.1 (--)

When hitting C-x ` (next-error) the point is positioned correctly only
if the buffer is not modified.  If number of lines before the target
position is changed, point is positioned wrongly.

For instance, say 'test.txt' contains these lines:

    foo
    bar
    baz

I then run 'grep' from Emacs like this:

    grep -nH -e ba test.txt

Results:

    -*- mode: grep; default-directory: "/home/paul/test/" -*-
    Grep started at Mon Feb 22 17:41:30

    grep -nH -e ba test.txt
    test.txt:2:bar
    test.txt:3:baz

    Grep finished (matches found) at Mon Feb 22 17:41:30

Then I insert a few more lines in 'test.txt' buffer:

    foo
    bar
    spam
    ham
    baz

Now if I hit C-x ` the first time point is moved to line 2 --
correctly.  The second time, however, the point is moved to line 3,
i.e. the original location of 'baz'.  However, 'baz' is now at line 5
and that's where I expect C-x ` to move point to.  Note that at no
point I closed the buffer, so Emacs should be able to track changes
between 'grep' run and current buffer/file contents.

This is especially unhelpful with compilation errors.  Often, you'd go
through errors fixing them in process, sometimes adding or removing
lines.  However, any such change makes finding subsequent errors
difficult as C-x ` will no longer locate errors correctly.

I believe this used to work fine in past.

Paul





Acknowledgement sent to Paul Pogonyshev <pogonyshev@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN:
bug#5620; 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: Sat, 4 Dec 2021 21:15:01 UTC

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