GNU bug report logs - #32051
26.1; grep-regexp-alist on windows

Previous Next

Package: emacs;

Reported by: Dan Harms <Dan.Harms <at> xrtrading.com>

Date: Wed, 4 Jul 2018 15:48:01 UTC

Severity: normal

Tags: fixed, patch

Found in version 26.1

Fixed in version 26.2

Done: Noam Postavsky <npostavs <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #11 received at 32051 <at> debbugs.gnu.org (full text, mbox):

From: Noam Postavsky <npostavs <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 32051 <at> debbugs.gnu.org, Dan Harms <Dan.Harms <at> xrtrading.com>
Subject: Re: bug#32051: 26.1; grep-regexp-alist on windows
Date: Wed, 4 Jul 2018 15:57:53 -0400
On 4 July 2018 at 12:26, Eli Zaretskii <eliz <at> gnu.org> wrote:

> I don't think I can reproduce this.  I've just ran a Grep command
> whose hits look like this:
>
>   d:/gnu/emacs/branch/src/callproc.c:214:#ifdef DOS_NT
>
> and they seem to exhibit all the traits of a Grep hit.

Looking at the grep-regexp-alist, it is the case that a filename with
a colon will not be matched when grep doesn't support --null. In the
case where grep does support --null, the NUL byte is displayed like a
colon, so the difference might not leap out at you.

I think the patch below would fix it:

--- i/lisp/progmodes/grep.el
+++ w/lisp/progmodes/grep.el
@@ -381,3 +381,5 @@ grep-regexp-alist
               ;; [0-9]+ so as to accept ":034:" in file names.
-              "\\(?1:[^\n:]+?[^\n/:]\\):[\t ]*\\(?2:[1-9][0-9]*\\)[\t ]*:"
+              "\\(?1:"
+              "\\(?:[a-zA-Z]:\\)?" ; Allow "C:..." for w32.
+              "[^\n:]+?[^\n/:]\\):[\t ]*\\(?2:[1-9][0-9]*\\)[\t ]*:"
               "\\)")




This bug report was last modified 7 years and 13 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.