[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: grep options
From: |
Thierry Volpiatto |
Subject: |
Re: grep options |
Date: |
Sat, 15 Jan 2011 08:19:17 +0100 |
User-agent: |
Gnus/5.110011 (No Gnus v0.11) Emacs/23.2.91 (gnu/linux) |
Thierry Volpiatto <thierry.volpiatto@gmail.com> writes:
> Ken Goldman <kgold@watson.ibm.com> writes:
>
>> When I use grep on C source, I'd like it to search all C source (.c,
>> .h, .cpp), not just the files with the same extension.
>>
>> I could do that with the (obsolete) igrep like this. Can I reproduce
>> it with emacs 23 / grep?
>>
>> (put 'igrep-files-default 'c-mode
>> (lambda () "*.[ch] *.cpp"))
>
> Anything grep that come with anything-config.el allow you to do that in
> two ways:
>
> 1) If you want to do a recursive search from your directory, access grep
> with C-u, you will be prompted with "OnlyExt: ", add all the ext you
> want like:
> *.c *.h *.cpp
> (separated with space)
>
> 2) if you don't want to recurse, from anything-find-files, narrow dow
> the list in your directory by adding a space followed by c$\|h$\|cpp$ at
> end of prompt e.g
> Pattern: /home/you/work/ c$\|h$\|cpp$
Sorry forget to mention you have to mark all with M-m before grepping.
> then select grep (no prefix arg this time) and start writting your
> pattern.
>
> FYI, this grep is incremental, results changes as you write in minibuffer.
>
> NOTE: You DON'T need the file anything-grep.el that is in anything repo,
> this work out of the box with the files:
>
> anything.el
> anything-config.el
> anything-match-plugin.el
>
> Here is the anything repo:
> http://repo.or.cz/w/anything-config.git
>
> For more info on anything, use the mailing-list at:
> https://groups.google.com/group/emacs-anything?hl=en
--
A+ Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997
- grep options, Ken Goldman, 2011/01/14
- Re: grep options, Thierry Volpiatto, 2011/01/15
- Re: grep options,
Thierry Volpiatto <=
- Re: grep options, Kenneth Goldman, 2011/01/16
- Re: grep options, guivho, 2011/01/23
- Message not available
- Re: grep options, Stefan Monnier, 2011/01/23
- Re: grep options, Ken Goldman, 2011/01/24
- Re: grep options, Kevin Rodgers, 2011/01/31