emacs-pretest-bug
[Top][All Lists]
Advanced

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

Re: Error in matcher for 'gnu' errors in compile.el


From: Stefan Monnier
Subject: Re: Error in matcher for 'gnu' errors in compile.el
Date: Mon, 24 Apr 2006 11:03:45 -0400
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

> The "gnu" error matcher in compile has a bug: it includes a matcher for an
> optional DOS-style drive specifier as part of the filename pattern:
>   \\([/.]*[a-zA-Z]:?[^ \t\n:]*\\|{standard input}\\)
> However because only the colon is optional, this imposes a requirement on the
> filename that its first component start with an (ASCII) alphabetic character;
> this does not match paths such as "../1-parsing/sample.c".
> The patch below resolves the problem by making the entire drivespec optional,
> instead of only the colon.  It also places it at the front (../a:xxx/ is not
> a valid filename).

Actually ../a:foo is a perfectly valid filename.  The grep.el code has
evolved in this respect in that it doesn't treat a DOS-style drive
letter specially, and I think we should do the same here: using non-greedy
matching instead.

How 'bout the patch below?


        Stefan


--- compile.el  03 Apr 2006 17:24:17 -0400      1.394
+++ compile.el  24 Apr 2006 10:54:04 -0400      
@@ -224,9 +224,9 @@
 
     (gnu
      "^\\(?:[[:alpha:]][-[:alnum:].]+: ?\\)?\
-\\([/.]*[a-zA-Z]:?[^ \t\n:]*\\|{standard input}\\): ?\
+\\(.+?\\): ?\
 \\([0-9]+\\)\\([.:]?\\)\\([0-9]+\\)?\
 \\(?:-\\(?:\\([0-9]+\\)\\3\\)?\\.?\\([0-9]+\\)?\\)?:\
 \\(?: *\\(\\(?:Future\\|Runtime\\)?[Ww]arning\\|W:\\)\\|\
  *\\([Ii]nfo\\(?:\\>\\|rmationa?l?\\)\\|I:\\)\\)?"
      1 (2 . 5) (4 . 6) (7 . 8))




reply via email to

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