From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#35326: 26.1; vc-git-grep should pass -i like isearch Date: Sun, 23 Jun 2019 21:02:32 +0200 Message-ID: References: <87d0lheuhv.fsf@curie.anarc.at> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="151506"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: 35326@debbugs.gnu.org To: Antoine =?UTF-8?Q?Beaupr=C3=A9?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Jun 23 21:03:12 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hf7lf-000dG4-LP for geb-bug-gnu-emacs@m.gmane.org; Sun, 23 Jun 2019 21:03:11 +0200 Original-Received: from localhost ([::1]:46484 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hf7le-0001hG-1w for geb-bug-gnu-emacs@m.gmane.org; Sun, 23 Jun 2019 15:03:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35133) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hf7lY-0001gx-EI for bug-gnu-emacs@gnu.org; Sun, 23 Jun 2019 15:03:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hf7lW-0001Hv-SC for bug-gnu-emacs@gnu.org; Sun, 23 Jun 2019 15:03:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:41108) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hf7lW-0001Gr-3y for bug-gnu-emacs@gnu.org; Sun, 23 Jun 2019 15:03:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hf7lV-0006HB-UL for bug-gnu-emacs@gnu.org; Sun, 23 Jun 2019 15:03:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 23 Jun 2019 19:03:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 35326 X-GNU-PR-Package: emacs Original-Received: via spool by 35326-submit@debbugs.gnu.org id=B35326.156131656024082 (code B ref 35326); Sun, 23 Jun 2019 19:03:01 +0000 Original-Received: (at 35326) by debbugs.gnu.org; 23 Jun 2019 19:02:40 +0000 Original-Received: from localhost ([127.0.0.1]:54652 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hf7lA-0006GM-DV for submit@debbugs.gnu.org; Sun, 23 Jun 2019 15:02:40 -0400 Original-Received: from quimby.gnus.org ([80.91.231.51]:45524) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hf7l9-0006GD-4r for 35326@debbugs.gnu.org; Sun, 23 Jun 2019 15:02:39 -0400 Original-Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=stories) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hf7l3-0000ou-9u; Sun, 23 Jun 2019 21:02:37 +0200 In-Reply-To: <87d0lheuhv.fsf@curie.anarc.at> ("Antoine \=\?utf-8\?Q\?Beaupr\?\= \=\?utf-8\?Q\?\=C3\=A9\=22's\?\= message of "Fri, 19 Apr 2019 14:10:36 -0400") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:161166 Archived-At: Antoine Beaupr=C3=A9 writes: > M-x load-library vc > M-x load-library vc-git > M-x vc-git-grep > > The resulting git grep command is: > > git --no-pager grep -n -e foo -- \* .\[\!.\]\* ..\?\* > > I believe it should be rather: > > git --no-pager grep -n -i -e foo -- \* .\[\!.\]\* ..\?\* > > ... that is, it should be case insensitive unless there are capital > letters in the search string. This is how isearch and regular M-x grep > both work. 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 --exclude=3D.\#\* --exclude=3D\*.o --exclude=3D\*\~ --exclude=3D\*.bi= n --exclude=3D\*.lbin --exclude=3D\*.so --exclude=3D\*.a --exclude=3D\*.ln = --exclude=3D\*.blg --exclude=3D\*.bbl --exclude=3D\*.elc --exclude=3D\*.lof= --exclude=3D\*.glo --exclude=3D\*.idx --exclude=3D\*.lot --exclude=3D\*.fm= t --exclude=3D\*.tfm --exclude=3D\*.class --exclude=3D\*.fas --exclude=3D\*= .lib --exclude=3D\*.mem --exclude=3D\*.x86f --exclude=3D\*.sparcf --exclude= =3D\*.dfsl --exclude=3D\*.pfsl --exclude=3D\*.d64fsl --exclude=3D\*.p64fsl = --exclude=3D\*.lx64fsl --exclude=3D\*.lx32fsl --exclude=3D\*.dx64fsl --excl= ude=3D\*.dx32fsl --exclude=3D\*.fx64fsl --exclude=3D\*.fx32fsl --exclude=3D= \*.sx64fsl --exclude=3D\*.sx32fsl --exclude=3D\*.wx64fsl --exclude=3D\*.wx3= 2fsl --exclude=3D\*.fasl --exclude=3D\*.ufsl --exclude=3D\*.fsl --exclude= =3D\*.dxl --exclude=3D\*.lo --exclude=3D\*.la --exclude=3D\*.gmo --exclude= =3D\*.mo --exclude=3D\*.toc --exclude=3D\*.aux --exclude=3D\*.cp --exclude= =3D\*.fn --exclude=3D\*.ky --exclude=3D\*.pg --exclude=3D\*.tp --exclude=3D= \*.vr --exclude=3D\*.cps --exclude=3D\*.fns --exclude=3D\*.kys --exclude=3D= \*.pgs --exclude=3D\*.tps --exclude=3D\*.vrs --exclude=3D\*.pyc --exclude= =3D\*.pyo --color -i -nH --null -e compile-goto-error *.el Confusing. > The reason this doesn't work with vc-git-grep is because the > default value of the template doesn't include the pattern. [...] > 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 , since grep and lgrep default do different things. And does git grep support --color, which will apparently also be inserted if you have ? - place to put the options like -i and --color. Weird system. --=20 (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no