From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Roy Smith Newsgroups: gmane.emacs.help Subject: Re: compilation-error-regexp-alist syntax problems Date: Tue, 03 Feb 2004 14:00:53 -0500 Organization: PANIX Public Access Internet and UNIX, NYC Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: NNTP-Posting-Host: deer.gmane.org X-Trace: sea.gmane.org 1075835860 14391 80.91.224.253 (3 Feb 2004 19:17:40 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 3 Feb 2004 19:17:40 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Feb 03 20:17:32 2004 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1Ao63A-0006NC-00 for ; Tue, 03 Feb 2004 20:17:32 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1Ao61Q-000346-Po for geh-help-gnu-emacs@m.gmane.org; Tue, 03 Feb 2004 14:15:44 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!bloom-beacon.mit.edu!panix!roy Original-Newsgroups: gnu.emacs.help Original-Lines: 42 Original-NNTP-Posting-Host: x4034c1ba.ip.e-nt.net Original-X-Trace: reader2.panix.com 1075834853 23330 64.52.193.186 (3 Feb 2004 19:00:53 GMT) Original-X-Complaints-To: abuse@panix.com Original-NNTP-Posting-Date: Tue, 3 Feb 2004 19:00:53 +0000 (UTC) User-Agent: MT-NewsWatcher/3.3b1 (PPC Mac OS X) Original-Xref: shelby.stanford.edu gnu.emacs.help:120667 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:16615 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:16615 In article , Stefan Monnier wrote: > > Ah hah! That's the problem. It's not in the local version. > > Next question, how do I get the local version to include it? > > Looking at `compile-internal', it seems you'll have to do > things differently. > The simplest is: > > (require 'compile) > (add-to-list 'compilation-error-regexp-alist > '("\\[javac\\] *\\(/[^:]+\\):\\([^:]*\\):" 1 2)) > > and if you don't want to have to preload compile.el from your .emacs file > (I personally hate it when I have to do that), you'l have to use something > like eval-after-load (a bit untidy) or to setq error-regexp-alist (really > ugly and likely to break in a future version of compile.el). > > Hmm... there's room for improvement in compile.el. > > > Stefan Ah, I got it! Once I got past the local/global problem, the next problem turned out to be that the regex apparantly must match the entire line (or at least anchored at the beginning). Adding " *" to the front of the regex (to match the leading white space) did the trick. I had never heard of looking-at before, that got me over that second hump. Thanks for your most patient help! The final working version is... (require 'compile) (add-to-list 'compilation-error-regexp-alist '(" *\\[javac\\] *\\(/[^:]+\\):\\([^:]*\\):" 1 2))