From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chong Yidong Newsgroups: gmane.emacs.devel Subject: Re: Dealing with "gnu" rule in compilation-error-regexp-alist Date: Thu, 15 Apr 2010 11:18:58 -0400 Message-ID: <87bpdku4kd.fsf@stupidchicken.com> References: <20100415112110.68C97188395@wsnyder.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1271346718 30723 80.91.229.12 (15 Apr 2010 15:51:58 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 15 Apr 2010 15:51:58 +0000 (UTC) Cc: emacs-devel@gnu.org To: wsnyder@wsnyder.org (Wilson Snyder) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Apr 15 17:51:57 2010 Return-path: Envelope-to: ged-emacs-devel@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 1O2RMB-0005Yi-0B for ged-emacs-devel@m.gmane.org; Thu, 15 Apr 2010 17:51:55 +0200 Original-Received: from localhost ([127.0.0.1]:41787 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O2RMA-0001r5-KS for ged-emacs-devel@m.gmane.org; Thu, 15 Apr 2010 11:51:54 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O2QqP-00022s-4x for emacs-devel@gnu.org; Thu, 15 Apr 2010 11:19:05 -0400 Original-Received: from [140.186.70.92] (port=47702 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O2QqN-00020r-NH for emacs-devel@gnu.org; Thu, 15 Apr 2010 11:19:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O2QqL-0005Jz-RE for emacs-devel@gnu.org; Thu, 15 Apr 2010 11:19:03 -0400 Original-Received: from pantheon-po33.its.yale.edu ([130.132.50.94]:42983) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O2QqL-0005Jm-LL for emacs-devel@gnu.org; Thu, 15 Apr 2010 11:19:01 -0400 Original-Received: from furry (dhcp128036014140.central.yale.edu [128.36.14.140]) (authenticated bits=0) by pantheon-po33.its.yale.edu (8.12.11.20060308/8.12.11) with ESMTP id o3FFJ01q009342 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Thu, 15 Apr 2010 11:19:00 -0400 Original-Received: by furry (Postfix, from userid 1000) id 3114EC055; Thu, 15 Apr 2010 11:18:59 -0400 (EDT) In-Reply-To: <20100415112110.68C97188395@wsnyder.org> (Wilson Snyder's message of "Thu, 15 Apr 2010 07:21:10 -0400 (EDT)") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.95 (gnu/linux) X-YaleITSMailFilter: Version 1.2c (attachment(s) not renamed) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4-2.6 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:123709 Archived-At: wsnyder@wsnyder.org (Wilson Snyder) writes: > (setq compilation-error-regexp-alist-alist > (append > '((percent "%?\\(Error\\|Warning\\):[\n ]*\\([^ \t:]+\\):\\([0-9]+\\):" 2 3)) > compilation-error-regexp-alist-alist)) > ;; Ok > (setq compilation-error-regexp-alist '(percent)) > (compile "echo 'zz: %Error: foo.x:1: something'") > (compile "echo '%Error: foo.x:1: something'") > ;; Bad > (setq compilation-error-regexp-alist '(percent gnu)) > (compile "echo 'zz: %Error: foo.x:1: something'") You need to anchor your regexp at the start of the line. For example, "^[^%\n]*%?\\(Error\\|Warning\\):[\n ]*\\([^ \t:]+\\):\\([0-9]+\\):" 2 3)) > Long term, I think it would be good have some sort of > ordering or priority to the rules. This is already the case.