all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Roy Smith <roy@panix.com>
Subject: Re: compilation-error-regexp-alist syntax problems
Date: Mon, 02 Feb 2004 16:38:52 -0500	[thread overview]
Message-ID: <roy-DA4938.16385202022004@reader2.panix.com> (raw)
In-Reply-To: jwv8yjlifkp.fsf-monnier+gnu.emacs.help@asado.iro.umontreal.ca

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]

  reply	other threads:[~2004-02-02 21:38 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-02-02 16:28 compilation-error-regexp-alist syntax problems Roy Smith
2004-02-02 17:02 ` Stefan Monnier
2004-02-02 21:38   ` Roy Smith [this message]
2004-02-03 16:07     ` Stefan Monnier
2004-02-03 17:07       ` Roy Smith
2004-02-03 17:54         ` Stefan Monnier
2004-02-03 19:00           ` Roy Smith
2004-02-03 19:05           ` Kevin Rodgers
2004-02-03 19:31             ` Stefan Monnier
2004-02-03 22:30               ` Kevin Rodgers
2004-02-04 14:50                 ` Stefan Monnier
2004-02-05 19:40                   ` Kevin Rodgers
2004-02-05 19:48                     ` Stefan Monnier
2004-02-05  8:45 ` Kai Grossjohann
2004-02-05 13:53   ` Roy Smith
2004-02-06 22:03 ` Daniel Pfeiffer

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=roy-DA4938.16385202022004@reader2.panix.com \
    --to=roy@panix.com \
    /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.