[Gloucs] Emacs - find-grep-dired case insensitivity
Andrew Ford
A.Ford at ford-mason.co.uk
Tue May 24 20:18:03 UTC 2011
On 24/05/11 11:47, Phil Ironside wrote:
> Yo
>
> Puzzlement.
>
> Using find-grep-dired I cannot get it do a case insensitive search.
>
> I have
>
> (setq case-fold-search t)
>
> set in my .emacs file but it still does not work as expected. I have searched online and that is the only advice that I can get.
>
If you look at the lisp code for find-grep-dired (in
.../lisp/find-dired.el) you will see that it constructs the find command
line as follows:
(find-dired dir
(concat "-type f -exec " grep-program " "
find-grep-options " -e "
(shell-quote-argument regexp)
" "
(shell-quote-argument "{}")
" "
(shell-quote-argument ";"))))
find-grep-options is defined by default as "-q" on Linux, so you could
just set it with:
(setq find-grep-options "-q -i")
Put this in your .emacs file and all your find-grep and find-grep-dired
commands will be case-insensitive.
Andrew
--
Andrew Ford
South Wing Compton House, Compton Green,
Redmarley, Gloucestershire, GL19 3JB, UK
Tel: +44 1531 829900
Mobile: +44 7785 258278
Email: A.Ford at ford-mason.co.u
More information about the gloucs
mailing list