From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chong Yidong Newsgroups: gmane.emacs.bugs Subject: bug#5983: 23.1.96; compilation-next-error broken Date: Tue, 20 Apr 2010 11:37:38 -0400 Message-ID: <87hbn6w2wt.fsf@stupidchicken.com> References: <827ho24fvl.fsf@stephe-leake.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1271779205 21597 80.91.229.12 (20 Apr 2010 16:00:05 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 20 Apr 2010 16:00:05 +0000 (UTC) Cc: 5983@debbugs.gnu.org, stephe To: Sam Steingold Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Apr 20 18:00:03 2010 connect(): No such file or directory Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1O4Frm-0006Zd-1a for geb-bug-gnu-emacs@m.gmane.org; Tue, 20 Apr 2010 18:00:02 +0200 Original-Received: from localhost ([127.0.0.1]:33248 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O4Frl-0001QD-96 for geb-bug-gnu-emacs@m.gmane.org; Tue, 20 Apr 2010 12:00:01 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O4FrH-0001Gd-MT for bug-gnu-emacs@gnu.org; Tue, 20 Apr 2010 11:59:31 -0400 Original-Received: from [140.186.70.92] (port=44800 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O4FrB-0001Dt-FZ for bug-gnu-emacs@gnu.org; Tue, 20 Apr 2010 11:59:31 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O4Fr6-00054J-NO for bug-gnu-emacs@gnu.org; Tue, 20 Apr 2010 11:59:25 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:57815) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O4Fr5-00054A-Qh for bug-gnu-emacs@gnu.org; Tue, 20 Apr 2010 11:59:20 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1O4FWT-0006q6-VZ; Tue, 20 Apr 2010 11:38:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Chong Yidong Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 20 Apr 2010 15:38:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 5983 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 5983-submit@debbugs.gnu.org id=B5983.127177786626283 (code B ref 5983); Tue, 20 Apr 2010 15:38:01 +0000 Original-Received: (at 5983) by debbugs.gnu.org; 20 Apr 2010 15:37:46 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O4FWD-0006pr-8J for submit@debbugs.gnu.org; Tue, 20 Apr 2010 11:37:45 -0400 Original-Received: from pantheon-po15.its.yale.edu ([130.132.50.71]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O4FWB-0006pk-H7 for 5983@debbugs.gnu.org; Tue, 20 Apr 2010 11:37:44 -0400 Original-Received: from furry (dhcp128036014104.central.yale.edu [128.36.14.104]) (authenticated bits=0) by pantheon-po15.its.yale.edu (8.12.11.20060308/8.12.11) with ESMTP id o3KFbcXX019310 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Tue, 20 Apr 2010 11:37:38 -0400 Original-Received: by furry (Postfix, from userid 1000) id A1F61C055; Tue, 20 Apr 2010 11:37:38 -0400 (EDT) In-Reply-To: <827ho24fvl.fsf@stephe-leake.org> (stephe's message of "Tue, 20 Apr 2010 05:45:02 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.96 (gnu/linux) X-YaleITSMailFilter: Version 1.2c (attachment(s) not renamed) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Tue, 20 Apr 2010 11:38:01 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) 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: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:36367 Archived-At: Hi Sam, this bug is due to your change: 2009-10-12 Sam Steingold * progmodes/compile.el (compilation-next-error-function): Fix the timestamps if the buffer has been visited before. Reverting this change fixes the bug. Could you double-check your work? I have no idea what bug this change is trying to fix. Thanks. stephe writes: > Starting from `emacs -Q': > > open this C file: > > ------------ > int main (int argc, char *argv[]) > { > > printf ("missing include\n"); > printf ("missing paren"; > return 0; > } /* end main */ > /* end of file */ > ------------ > > (note that it is missing a #include, and is missing a paren) > > Attempt to compile it: > > M-x compile > > Change the compile command to: > > gcc test.c > > This gives a list of compilation errors: > > -*- mode: compilation; default-directory: "/home/stephe/" -*- > Compilation started at Tue Apr 20 05:25:38 > > gcc test.c > test.c: In function =E2=80=98main=E2=80=99: > test.c:4: warning: incompatible implicit declaration of built-in function= =E2=80=98printf=E2=80=99 > test.c:5: error: expected =E2=80=98)=E2=80=99 before =E2=80=98;=E2=80=99 = token > test.c:7: error: expected =E2=80=98;=E2=80=99 before =E2=80=98}=E2=80=99 = token > > Compilation exited abnormally with code 1 at Tue Apr 20 05:25:38 > ------------ > > Go to the first error: C-x ` . point is now on the line that prints > "missing include". Fix the problem by adding a line "#include " > at the top of the buffer. Now the line number in the next error message > is wrong, but Emacs used to handle that by using markers appropriately. > > Now go to the next error: C-x `. Point should be on the line that prints > "missing paren", but it is on the previous line (the current line 5). > > The problem seems to be in compilation-next-error. It has a mechanism > that sets markers based on the line/column info in the error messages, > assuming the file has not changed. It puts file mod timestamps in the > compilation error structure to record that this has been done, so it > doesn't get done again (after the buffer has changed). However, it > doesn't set the timestamp in every line, and when it gets to a line > without a timestamp, it processes the marker info again, which is wrong.