From n_schumacher@web.de Sun Jun 15 09:27:53 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-5.0 required=4.0 tests=BAYES_00,MURPHY_DRUGS_REL8, RCVD_IN_DNSWL_LOW autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at submit) by emacsbugs.donarmstrong.com; 15 Jun 2008 16:27:53 +0000 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m5FGRlFi017280 for ; Sun, 15 Jun 2008 09:27:48 -0700 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1K7v50-0003G7-QC for bug-gnu-emacs@gnu.org; Sun, 15 Jun 2008 12:27:46 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1K7v4y-0003Cq-Na for bug-gnu-emacs@gnu.org; Sun, 15 Jun 2008 12:27:46 -0400 Received: from [199.232.76.173] (port=39883 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K7v4y-0003CW-J2 for bug-gnu-emacs@gnu.org; Sun, 15 Jun 2008 12:27:44 -0400 Received: from fmmailgate03.web.de ([217.72.192.234]:34727) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1K7v4y-0002Xi-8B for bug-gnu-emacs@gnu.org; Sun, 15 Jun 2008 12:27:44 -0400 Received: from smtp06.web.de (fmsmtp06.dlan.cinetic.de [172.20.5.172]) by fmmailgate03.web.de (Postfix) with ESMTP id D56BADFE854B for ; Sun, 15 Jun 2008 18:27:38 +0200 (CEST) Received: from [77.189.9.128] (helo=thursday) by smtp06.web.de with asmtp (WEB.DE 4.109 #226) id 1K7v4s-0001vQ-00 for bug-gnu-emacs@gnu.org; Sun, 15 Jun 2008 18:27:38 +0200 To: bug-gnu-emacs@gnu.org Subject: flymake highlights errors from wrong file From: Nikolaj Schumacher User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (darwin) Date: Sun, 15 Jun 2008 18:27:37 +0200 Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Sender: n_schumacher@web.de X-Sender: n_schumacher@web.de X-Provags-ID: V01U2FsdGVkX1/5RsjKHp9fTIJuUUAAcYOO8WF7a8HwGXJfLSu9 2tz78pzQFXTqO+vFauB03uSce0Y4janud0nuePieaHzvY3ftcE aGUl1CPlbSm4FvAlDDoA== X-detected-kernel: by monty-python.gnu.org: Linux 2.4-2.6 --=-=-= Hello. flymake will highlight errors in the current buffer, even if the error comes from a different file. This can be noted, for example, when using > check-syntax: > gcc -Wall -Wextra -fsyntax-only *.cpp instead of the more common > check-syntax: > gcc -Wall -Wextra -pedantic -fsyntax-only -S $(CHK_SOURCES) in the Makefile. It also happens when using ant, where it can't be avoided. The attached patch filters out these errors when parsing. Alternatively, they could be filtered out when highlighting. regards, Nikolaj Schumacher --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=emacs-flymake-other-files.patch Content-Description: patch diff -du /Users/nik/emacs/var/backup/\!Applications\!Emacs.app\!Contents\!Resources\!share\!emacs\!22.2\!lisp\!progmodes\!flymake.el.\~2\~ /Applications/Emacs.app/Contents/Resources/share/emacs/22.2/lisp/progmodes/flymake.el --- lisp/progmodes/flymake.el 2008-06-02 23:30:29.000000000 +0200 +++ lisp/progmodes/flymake.el 2008-06-05 23:30:08.000000000 +0200 @@ -866,11 +867,10 @@ (flymake-ler-file line-err-info))) (setq line-err-info (flymake-ler-set-full-file line-err-info real-file-name)) - (if (flymake-same-files real-file-name source-file-name) - (setq line-err-info (flymake-ler-set-file line-err-info nil)) - (setq line-err-info (flymake-ler-set-file line-err-info (file-name-nondirectory real-file-name)))) + (when (flymake-same-files real-file-name source-file-name) + (setq line-err-info (flymake-ler-set-file line-err-info nil)) + (setq err-info-list (flymake-add-err-info err-info-list line-err-info)))) - (setq err-info-list (flymake-add-err-info err-info-list line-err-info))) (flymake-log 3 "parsed '%s', %s line-err-info" (nth idx lines) (if line-err-info "got" "no")) (setq idx (1+ idx))) err-info-list)) Diff finished. Thu Jun 5 23:30:18 2008 --=-=-=-- From cyd@stupidchicken.com Mon Aug 18 12:20:44 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-3.5 required=4.0 tests=AWL,BAYES_00, MURPHY_DRUGS_REL8 autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 416) by emacsbugs.donarmstrong.com; 18 Aug 2008 19:20:45 +0000 Received: from cyd.mit.edu (CYD.MIT.EDU [18.115.2.24]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m7IJKb18007928 for <416@emacsbugs.donarmstrong.com>; Mon, 18 Aug 2008 12:20:38 -0700 Received: by cyd.mit.edu (Postfix, from userid 1000) id 714AB57E1C6; Mon, 18 Aug 2008 15:21:39 -0400 (EDT) From: Chong Yidong To: Pavel Kobyakov Cc: Nikolaj Schumacher , 416@debbugs.gnu.org Subject: Re: flymake highlights errors from wrong file Date: Mon, 18 Aug 2008 15:21:39 -0400 Message-ID: <874p5ijfi4.fsf@cyd.mit.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Hi Pavel, Could you review the patch sent by Nikolaj? Thanks. Nikolaj Schumacher wrote: > flymake will highlight errors in the current buffer, even if the error > comes from a different file. > > This can be noted, for example, when using > > > check-syntax: > > gcc -Wall -Wextra -fsyntax-only *.cpp > > instead of the more common > > > check-syntax: > > gcc -Wall -Wextra -pedantic -fsyntax-only -S $(CHK_SOURCES) > > in the Makefile. > > It also happens when using ant, where it can't be avoided. > > The attached patch filters out these errors when parsing. > Alternatively, they could be filtered out when highlighting. --- lisp/progmodes/flymake.el 2008-06-02 23:30:29.000000000 +0200 +++ lisp/progmodes/flymake.el 2008-06-05 23:30:08.000000000 +0200 @@ -866,11 +867,10 @@ (flymake-ler-file line-err-info))) (setq line-err-info (flymake-ler-set-full-file line-err-info real-file-name)) - (if (flymake-same-files real-file-name source-file-name) - (setq line-err-info (flymake-ler-set-file line-err-info nil)) - (setq line-err-info (flymake-ler-set-file line-err-info (file-name-nondirectory real-file-name)))) + (when (flymake-same-files real-file-name source-file-name) + (setq line-err-info (flymake-ler-set-file line-err-info nil)) + (setq err-info-list (flymake-add-err-info err-info-list line-err-info)))) - (setq err-info-list (flymake-add-err-info err-info-list line-err-info))) (flymake-log 3 "parsed '%s', %s line-err-info" (nth idx lines) (if line-err-info "got" "no")) (setq idx (1+ idx))) err-info-list)) From cyd@stupidchicken.com Sun Sep 7 12:06:34 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-3.8 required=4.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at control) by emacsbugs.donarmstrong.com; 7 Sep 2008 19:06:34 +0000 Received: from cyd.mit.edu (CYD.MIT.EDU [18.115.2.24]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m87J6WGn001775 for ; Sun, 7 Sep 2008 12:06:33 -0700 Received: by cyd.mit.edu (Postfix, from userid 1000) id 040F757E355; Sun, 7 Sep 2008 15:09:20 -0400 (EDT) From: Chong Yidong To: control@debbugs.gnu.org Subject: close 416 Date: Sun, 07 Sep 2008 15:09:20 -0400 Message-ID: <87iqt76ae7.fsf@cyd.mit.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii close 416 thanks From cyd@stupidchicken.com Sun Sep 7 12:06:12 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-3.8 required=4.0 tests=AWL,BAYES_00, MURPHY_DRUGS_REL8 autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 416-done) by emacsbugs.donarmstrong.com; 7 Sep 2008 19:06:12 +0000 Received: from cyd.mit.edu (CYD.MIT.EDU [18.115.2.24]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m87J69gT001767 for <416-done@emacsbugs.donarmstrong.com>; Sun, 7 Sep 2008 12:06:10 -0700 Received: by cyd.mit.edu (Postfix, from userid 1000) id 3E85B57E355; Sun, 7 Sep 2008 15:08:57 -0400 (EDT) From: Chong Yidong To: Nikolaj Schumacher Cc: 416-done@debbugs.gnu.org Subject: Re: flymake highlights errors from wrong file Date: Sun, 07 Sep 2008 15:08:57 -0400 Message-ID: <87ljy36aeu.fsf@cyd.mit.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii > flymake will highlight errors in the current buffer, even if the error > comes from a different file. > > The attached patch filters out these errors when parsing. > Alternatively, they could be filtered out when highlighting. I've checked your patch into CVS. Thanks. From unknown Mon Aug 18 11:15:01 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: $requester Subject: Internal Control Message-Id: bug archived. Date: Mon, 06 Oct 2008 14:24:03 +0000 User-Agent: Fakemail v42.6.9 # A New Hope # A log time ago, in a galaxy far, far away # something happened. # # Magically this resulted in the following # action being taken, but this fake control # message doesn't tell you why it happened # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator