unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Upgraded to Emacs 24; custom compilation-error-regexp-alist no longer works
@ 2013-01-17  0:58 Laird Nelson
  2013-01-17  1:26 ` Laird Nelson
  0 siblings, 1 reply; 2+ messages in thread
From: Laird Nelson @ 2013-01-17  0:58 UTC (permalink / raw)
  To: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 1872 bytes --]

Hello; I hope this is the right email list for this kind of question.

I just upgraded to Emacs 24.2 on a Mac.  I'm using the no-nonsense prefab
distribution of Emacs.app.

I have customized my compilation-error-regexp-alist to handle Maven 3.0.4
output (well, or more specifically to handle the output of the
maven-compiler-plugin version 3.0).  However, it does not identify error
output properly, even though re-builder shows the regexp as matching just
fine.

Here is some sample output from the compiler:

[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR]
/Users/ljnelson/Projects/github/foobar/src/main/java/foobar/BasicThreadScheduler.java:[42,12]
cannot find symbol
symbol  : constructor
Thread(foobar.ProgramCounter<T>,java.util.List<T>,int,foobar.BasicThreadScheduler<T>)
location: class foobar.Thread<T>


Using re-builder, I found that the following regular expression matches the
relevant line above, with a total of three capture groups (not including
group 0, i.e. the whole string):

^\\[\\(?:ERROR\\|WARNING\\)\\]\s+\\([^[]+\\):\\[\\([0-9]+\\),\\([0-9]+\\)\\]


Using the customize emacs machinery, I added this to
compilation-error-regexp-alist as an error specification:

("
^\\[\\(?:ERROR\\|WARNING\\)\\]\s+\\([^[]+\\):\\[\\([0-9]+\\),\\([0-9]+\\)\\]"
1 2 3)


My intent was that the first of three capture groups should identify the
filename, the second the line number, and the third the column number.  In
my sample output above, re-builder shows that the following line is the
first line matched:

[ERROR]
/Users/ljnelson/Projects/github/foobar/src/main/java/foobar/BasicThreadScheduler.java:[42,12]
cannot find symbol


However, my compilation buffer does not "light up" like it used to.

What am I missing?

Thanks for any help you can provide.

Best,
Laird

-- 
http://about.me/lairdnelson

[-- Attachment #2: Type: text/html, Size: 3730 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Upgraded to Emacs 24; custom compilation-error-regexp-alist no longer works
  2013-01-17  0:58 Upgraded to Emacs 24; custom compilation-error-regexp-alist no longer works Laird Nelson
@ 2013-01-17  1:26 ` Laird Nelson
  0 siblings, 0 replies; 2+ messages in thread
From: Laird Nelson @ 2013-01-17  1:26 UTC (permalink / raw)
  To: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 758 bytes --]

On Wed, Jan 16, 2013 at 4:58 PM, Laird Nelson <ljnelson@gmail.com> wrote:

> I have customized my compilation-error-regexp-alist to handle Maven 3.0.4
> output (well, or more specifically to handle the output of the
> maven-compiler-plugin version 3.0).  However, it does not identify error
> output properly, even though re-builder shows the regexp as matching just
> fine.
>

I moved my entry to the top of the list and the problem went away.

Curious, I checked out the etc/compilation.txt file in compilation mode,
and not all of the entries that are supposed to be highlighted are
highlighted.  Perhaps some default entry in the list somewhere is
corrupting everything below it.  Just a data point.

Thanks,
Best,
Laird

-- 
http://about.me/lairdnelson

[-- Attachment #2: Type: text/html, Size: 1383 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-01-17  1:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-17  0:58 Upgraded to Emacs 24; custom compilation-error-regexp-alist no longer works Laird Nelson
2013-01-17  1:26 ` Laird Nelson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).