>> 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. > > Yeah, sure, but no confusion here was why `M-x lgrep' adds the -i and > `M-x grep' does not? (running from -Q.) The confusion was caused by the original report mentioning `M-x grep'. In fact, `M-x grep' doesn't expand the template. Only the following commands expand the template: lgrep rgrep vc-git-grep > And should the vc-git version be more like grep or lgrep? vc-git-grep should be like other commands that expand the template, i.e. lgrep and rgrep, that the patch in the original report correctly achieves, so committing it would be an improvement since `git grep' supports most of grep options, including --color, -i and -w. PS: Regarding -w that I proposed previously, I could create a separate request, but here is a preliminary version: