From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: wsnyder@wsnyder.org (Wilson Snyder) Newsgroups: gmane.emacs.devel Subject: Dealing with "gnu" rule in compilation-error-regexp-alist Date: Thu, 15 Apr 2010 07:21:10 -0400 (EDT) Message-ID: <20100415112110.68C97188395@wsnyder.org> NNTP-Posting-Host: lo.gmane.org X-Trace: dough.gmane.org 1271330492 29248 80.91.229.12 (15 Apr 2010 11:21:32 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 15 Apr 2010 11:21:32 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Apr 15 13:21:31 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 1O2N8V-0005K7-3I for ged-emacs-devel@m.gmane.org; Thu, 15 Apr 2010 13:21:31 +0200 Original-Received: from localhost ([127.0.0.1]:52801 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O2N8U-0007VZ-Ei for ged-emacs-devel@m.gmane.org; Thu, 15 Apr 2010 07:21:30 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O2N8N-0007VA-8H for emacs-devel@gnu.org; Thu, 15 Apr 2010 07:21:23 -0400 Original-Received: from [140.186.70.92] (port=38126 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O2N8K-0007UD-0G for emacs-devel@gnu.org; Thu, 15 Apr 2010 07:21:20 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O2N8D-0005MZ-Ik for emacs-devel@gnu.org; Thu, 15 Apr 2010 07:21:19 -0400 Original-Received: from wsnyder.org ([66.249.9.161]:50091) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O2N8D-0005MI-Cy for emacs-devel@gnu.org; Thu, 15 Apr 2010 07:21:13 -0400 Original-Received: from wsnyder.org (c-24-91-159-26.hsd1.ma.comcast.net [24.91.159.26]) by wsnyder.org (Postfix) with ESMTP id 93B66E0234 for ; Thu, 15 Apr 2010 11:21:11 +0000 (UTC) Original-Received: by wsnyder.org (Postfix, from userid 1017) id 68C97188395; Thu, 15 Apr 2010 07:21:10 -0400 (EDT) X-ssh-sendmail: true X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) 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:123703 Archived-At: I'm trying to debug a problem with a compile error regexp. An example is below; the highlighting may look correct, but next-error will bring you to the wrong filename. (I'm using the HEAD, but the same issue exists since Emacs 21.) What's going on is the "gnu" rule is trumping the "percent" rule - if you look at the comments for the "gnu" rule in compile.el, it been hacked to reduce aggressiveness several times before. What do people suggest to work around this problem? When compile is called from inside the package-mode's buffer it could subtract "gnu" from compilation-error-regexp-alist, but that seems very unfriendly, and hard for users to debug. Likewise tweaking the "gnu" rule makes a mess, as there's really several regexps causing the problem. The solution needs to work with the already released versions of Emacs too. Long term, I think it would be good have some sort of ordering or priority to the rules; "gnu" being low priority, without breaking the later fontification rules (why these rules "append" now). Thanks (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 '(gnu percent)) (compile "echo 'zz: %Error: foo.x:1: something'") ;; Bad (setq compilation-error-regexp-alist '(percent gnu)) (compile "echo 'zz: %Error: foo.x:1: something'")