From: wsnyder@wsnyder.org (Wilson Snyder)
To: Chong Yidong <cyd@stupidchicken.com>
Cc: emacs-devel@gnu.org
Subject: Re: Dealing with "gnu" rule in compilation-error-regexp-alist
Date: Thu, 15 Apr 2010 11:26:14 -0400 (EDT) [thread overview]
Message-ID: <20100415152615.0313B188395@wsnyder.org> (raw)
In-Reply-To: 87bpdku4kd.fsf@stupidchicken.com
>wsnyder@wsnyder.org (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))
Unfortunately I had already tried that. It looks better for
the example I sent but doesn't solve more complicated
patterns.
>> Long term, I think it would be good have some sort of
>> ordering or priority to the rules.
>
>This is already the case.
Can you describe how to use it then? Sorry I missed it - I
followed the code and it seems to just do a mapcar to build
the font-lock list and always uses 'append, so font-lock
will keep processing.
-Wilson
next prev parent reply other threads:[~2010-04-15 15:26 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-15 11:21 Dealing with "gnu" rule in compilation-error-regexp-alist Wilson Snyder
2010-04-15 15:18 ` Chong Yidong
2010-04-15 15:26 ` Wilson Snyder [this message]
2010-04-15 18:54 ` Stefan Monnier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100415152615.0313B188395@wsnyder.org \
--to=wsnyder@wsnyder.org \
--cc=cyd@stupidchicken.com \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
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).