Subject: bug#6843: grep-mode and filenames with colons

From: Dmitry Gutov <[email-masked]>
Date: Thu, 27 Jul 2017 15:10:40 +0300

On 7/27/17 2:32 AM, [email-masked] 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.