help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: compilation mode: wrong default error regexp blocking workflow


From: LanX
Subject: Re: compilation mode: wrong default error regexp blocking workflow
Date: Mon, 22 Dec 2014 19:42:44 -0800 (PST)
User-agent: G2/1.0

OK 

I digged into the sources of compilation mode but I wasn't able to identify the 
origin of this greedy default regexp.

But I found a workaround!

One has to define an own regexp which matches the same lines before the default 
regexp can do and has to correct the matching groups to avoid strange 
characters.

This is a proof of concept

 (add-to-list 'compilation-error-regexp-alist-alist '(perl "^.*?\\([a-zA-Z/][^ 
\n#]+\\):\\([0-9]+\\):" 1 2))

Now only paths starting with a character or a slash and w/o whitespace or # in 
between are matched. Any other leading characters are ignored.

Of course you'll still need to append the old regexp for typical Perl error 
messages, I left this out for readability.

And you'll have to do it for each programming mode...

HTH
 LanX


reply via email to

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