[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: compilation-error-regexp-alist syntax problems
From: |
Roy Smith |
Subject: |
Re: compilation-error-regexp-alist syntax problems |
Date: |
Mon, 02 Feb 2004 16:38:52 -0500 |
User-agent: |
MT-NewsWatcher/3.3b1 (PPC Mac OS X) |
In article
<jwv8yjlifkp.fsf-monnier+gnu.emacs.help@asado.iro.umontreal.ca>,
Stefan Monnier <monnier@iro.umontreal.ca> wrote:
> > (cons '("\\[javac\\] *\(/[^:]+\):\([^:]*\):" 1 2)
> > compilation-error-regexp-alist)
> \\( \\) \\( \\)
>
> The regexp is written as a string. \ is both a string and
> a regexp operator. When you write \n in a string it is turned into
> linefeed char. When you write \( it is turned into an open paren
> (i.e. just as if there was no backslash), when you write \\ it is turned
> into a single backslash. To pass \( to the regexp engine, you have thus to
> write \\ for the backslash and ( or \( for the open-paren.
>
> When entering a regexp interactively in C-u C-s (for example), it's
> different because it is not written as an elisp string so the quoting is
> unnecessary.
>
>
> Stefan
Hmmm. That's not working either. Now I've got this in my .emacs file:
(add-hook 'compilation-mode-hook 'my-compilation-mode-hook t)
(defun my-compilation-mode-hook ()
(setq compilation-error-regexp-alist
(cons '("\\[javac\\] *\\(/[^:]+\\):\\([^:]*\\):" 1 2)
compilation-error-regexp-alist)
))
and it's still not finding the right lines. When I look at the value of
compilation-error-regexp-alist (C-h v), I get:
Local in buffer *compilation*; global value is
(("\\[javac\\] *\\(/[^:]+\\):\\([^:]*\\):" 1 2)
[etc]
- compilation-error-regexp-alist syntax problems, Roy Smith, 2004/02/02
- Re: compilation-error-regexp-alist syntax problems, Stefan Monnier, 2004/02/02
- Re: compilation-error-regexp-alist syntax problems,
Roy Smith <=
- Re: compilation-error-regexp-alist syntax problems, Stefan Monnier, 2004/02/03
- Re: compilation-error-regexp-alist syntax problems, Roy Smith, 2004/02/03
- Re: compilation-error-regexp-alist syntax problems, Stefan Monnier, 2004/02/03
- Re: compilation-error-regexp-alist syntax problems, Roy Smith, 2004/02/03
- Re: compilation-error-regexp-alist syntax problems, Kevin Rodgers, 2004/02/03
- Re: compilation-error-regexp-alist syntax problems, Stefan Monnier, 2004/02/03
- Re: compilation-error-regexp-alist syntax problems, Kevin Rodgers, 2004/02/03
- Re: compilation-error-regexp-alist syntax problems, Stefan Monnier, 2004/02/04
- Re: compilation-error-regexp-alist syntax problems, Kevin Rodgers, 2004/02/05
- Re: compilation-error-regexp-alist syntax problems, Stefan Monnier, 2004/02/05