[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
Re: grep-command: Ignore case if case-fold-search is non-nil
From:
Tino Calancha
Subject:
Re: grep-command: Ignore case if case-fold-search is non-nil
Date:
2016年9月18日 19:30:20 +0900 (JST)
User-agent:
Alpine 2.20 (DEB 67 2015年01月07日)
On 2016年9月18日, 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?
Tino
Re: grep-command: Ignore case if case-fold-search is non-nil , Eli Zaretskii, 2016年09月18日
RE: grep-command: Ignore case if case-fold-search is non-nil , Drew Adams, 2016年09月18日