[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: compilation-error-regexp-alist syntax problems

From: Roy Smith
Subject: Re: compilation-error-regexp-alist syntax problems
Date: Tue, 03 Feb 2004 14:00:53 -0500
User-agent: MT-NewsWatcher/3.3b1 (PPC Mac OS X)

In article 
 Stefan Monnier <address@hidden> 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 

Thanks for your most patient help!

The final working version is...

(require 'compile)
(add-to-list 'compilation-error-regexp-alist
             '(" *\\[javac\\] *\\(/[^:]+\\):\\([^:]*\\):" 1 2))

reply via email to

[Prev in Thread] Current Thread [Next in Thread]