From: Chong Yidong <cyd@stupidchicken.com>
To: wsnyder@wsnyder.org (Wilson Snyder)
Cc: emacs-devel@gnu.org
Subject: Re: Dealing with "gnu" rule in compilation-error-regexp-alist
Date: Thu, 15 Apr 2010 11:18:58 -0400 [thread overview]
Message-ID: <87bpdku4kd.fsf@stupidchicken.com> (raw)
In-Reply-To: <20100415112110.68C97188395@wsnyder.org> (Wilson Snyder's message of "Thu, 15 Apr 2010 07:21:10 -0400 (EDT)")
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))
> Long term, I think it would be good have some sort of
> ordering or priority to the rules.
This is already the case.
next prev parent reply other threads:[~2010-04-15 15:18 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 [this message]
2010-04-15 15:26 ` Wilson Snyder
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87bpdku4kd.fsf@stupidchicken.com \
--to=cyd@stupidchicken.com \
--cc=emacs-devel@gnu.org \
--cc=wsnyder@wsnyder.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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.