GNU bug report logs - #35326
26.1; vc-git-grep should pass -i like isearch

Previous Next

Package: emacs;

Reported by: Antoine Beaupré <anarcat <at> orangeseeds.org>

Date: Fri, 19 Apr 2019 18:33:02 UTC

Severity: minor

Tags: fixed

Found in version 26.1

Fixed in version 27.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


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

From: Juri Linkov <juri <at> linkov.net>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: Antoine Beaupré <anarcat <at> orangeseeds.org>,
 35326 <at> debbugs.gnu.org
Subject: Re: bug#35326: 26.1; vc-git-grep should pass -i like isearch
Date: Mon, 24 Jun 2019 00:38:50 +0300
> Hm...  The default grep command on my machine (Debian GNU/Linux stretch)
> is "grep --color -nH --null -e", so it is case sensitive.
>
> Oh, lgrep does add the -i parameter:
>
> grep [...] --color -i -nH --null -e
> compile-goto-error *.el
>
> Confusing.
>
>> Obviously, it's also possible for users to customize that variable
>> themselves and add that string, but it's less than obvious they can do
>> so because the help string doesn't document that magic escape sequence,
>> nor does it document the *other* escape sequences supported by
>> grep-expand-template (which is also probably a bug).
>
> Yes, the doc string should contain all the possible expansions, but I'm
> not sure whether it should default to having <C>, since grep and lgrep
> default do different things.  And does git grep support --color, which
> will apparently also be inserted if you have <C>?
>
>  <C> - place to put the options like -i and --color.
>
> Weird system.

grep-expand-template adds the option -i on this condition:

  (and case-fold-search (isearch-no-upper-case-p regexp t))

It's very like when isearch turns into case-insensitive search
when the search string contains no upper-case letters.

BTW, often there is also need to add the option -w to match
whole words, but I have no idea how to enable this in grep templates.




This bug report was last modified 5 years and 330 days ago.

Previous Next


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