On Sun, 18 Sep 2016, Dmitry Gutov wrote:
On 18.09.2016 12:31, Tino Calancha wrote:
Do you think `grep-compute-defaults' should add '-i', i.e., ignore case,
in the default `grep-command' when `case-fold-search' is non-nil?
Option '-i' is specified by POSIX, do we need to check if `grep-program'
support it?
grep-options is used in both grep-template and grep-find-template.
And they both get "-i" inserted into later, in grep-expand-template.
Thank you.
Tha's right: `rgrep' and `lgrep' default to case _insensitive_ search; but
`grep-find' defaults to case _sensitive_ search.
emacs -Q
M-: (dired (concat source-directory "/lisp")) RET
M-x: lgrep RET undid RET replace.el RET RET
;; Found a match (same for rgrep)
M-x: grep-find RET
;; show a case sensitive default command as follows:
find . -type f -exec grep --color -nH -e \{\} +
I would suggest to be instead:
find . -type f -exec grep --color -nHi -e \{\} +
that would be consistent with defaults for `rgrep' and `lgrep'.
What do you think?