emacs-devel
[Top][All Lists]
Advanced

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

Re: Dealing with "gnu" rule in compilation-error-regexp-alist


From: Chong Yidong
Subject: Re: Dealing with "gnu" rule in compilation-error-regexp-alist
Date: Thu, 15 Apr 2010 11:18:58 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.95 (gnu/linux)

address@hidden (Wilson Snyder) writes:

> (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 '(percent gnu))
> (compile "echo 'zz: %Error: foo.x:1: something'")

You need to anchor your regexp at the start of the line.  For example,

   "^[^%\n]*%?\\(Error\\|Warning\\):[\n ]*\\([^ \t:]+\\):\\([0-9]+\\):" 2 3))

> Long term, I think it would be good have some sort of
> ordering or priority to the rules.

This is already the case.




reply via email to

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