GNU bug report logs - #6843
23.1; grep-mode and filenames with colons

Previous Next

Package: emacs;

Reported by: Ethan Glasser-Camp <glasse <at> cs.rpi.edu>

Date: Wed, 11 Aug 2010 14:11:02 UTC

Severity: normal

Tags: fixed, patch

Merged with 7378

Found in versions 23.1, 23.2

Fixed in version 26.1

Done: npostavs <at> users.sourceforge.net

Bug is archived. No further changes may be made.

Full log


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

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: npostavs <at> users.sourceforge.net, bug#6843 <6843 <at> debbugs.gnu.org>,
 Andreas Schwab <schwab <at> linux-m68k.org>
Subject: Re: bug#6843: grep-mode and filenames with colons
Date: Thu, 27 Jul 2017 15:10:40 +0300
On 7/27/17 2:32 AM, npostavs <at> users.sourceforge.net wrote:

> As noted in the emacs-devel thread, non-GNU greps don't support it.

And we can't always ask the user to install GNU Grep?

If we do need to support both ways, maybe tweak the variable names. As 
of now, they look a bit inconsistent.

I'd prefer to have either grep-with-null-regexp-alist and 
grep-[without-null-]-regexp-alist, or grep-regexp-alist and 
grep-fallback-regexp-alist. Just a suggestion.

>> Any reason to change 2 to 3? Why don't we use a non-capturing group for \0
>> here?
> 
> It's on the next line, I capture the \0 so as to display it with a nicer
> string than "^@".

Oh, right. Thanks.

>>> +     (2 '(face unspecified display ":")))
> 
>> If the numbers are the same, we could keep the variable's name the same as
>> well. As a result, most third-party code would continue to simply work.
> 
> Might be worth using explicitly numbered groups to keep the numbers for
> FILE and COLUMN the same though.

Yes, I think it will be a good idea. Provided we can combine it with 
renaming either of the variables back to grep-regexp-alist. Otherwise, 
any backward compatibility is broken anyway.

>> Compensating for the multitude of variables by eliminating newlines between
>> them doesn't look too hot to me.
> 
> Hmm yeah, I think I had them originally as let-bindings, and then I
> forgot to space them out when converting to defconst.

Thanks in advance.




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

Previous Next


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