unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Kenneth Goldman <kgoldman@us.ibm.com>
Cc: help-gnu-emacs@gnu.org
Subject: Re: grep options
Date: Sun, 16 Jan 2011 15:32:17 -0500	[thread overview]
Message-ID: <OF2A593A0A.61E3C88D-ON8525781A.006E91C6-8525781A.0070D1BA@us.ibm.com> (raw)
In-Reply-To: <878vymbpqy.fsf@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2100 bytes --]

This looks like a lot more work than igrep.  I didn't have to select files 
and manually
enter the extensions.  igrep just knew that, if the file was c-mode, it 
should search
*.[ch] *.cpp --- by default.

In combination for "search for the string under point", I could grep with 
a single keystroke.

help-gnu-emacs-bounces+kgold=watson.ibm.com@gnu.org wrote on 01/15/2011 
02:16:53 AM:

> From: Thierry Volpiatto <thierry.volpiatto@gmail.com>
> To: help-gnu-emacs@gnu.org
> Date: 01/15/2011 02:18 AM
> Subject: Re: grep options
> Sent by: help-gnu-emacs-bounces+kgold=watson.ibm.com@gnu.org
> 
> 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$
> 
> 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 
> 
> 

[-- Attachment #2: Type: text/html, Size: 3171 bytes --]

  parent reply	other threads:[~2011-01-16 20:32 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-14 18:47 grep options Ken Goldman
2011-01-15  7:16 ` Thierry Volpiatto
2011-01-15  7:19   ` Thierry Volpiatto
2011-01-16 20:32   ` Kenneth Goldman [this message]
2011-01-21  7:03     ` Kevin Rodgers
2011-01-21 19:33       ` Ken Goldman
2011-01-21 21:14         ` guivho
2011-01-22  5:08         ` Leo
2011-01-24 18:24           ` Ken Goldman
     [not found]         ` <mailman.6.1295672954.8460.help-gnu-emacs@gnu.org>
2011-01-24  3:58           ` Stefan Monnier
2011-01-24 18:28             ` Ken Goldman
2011-02-01  2:50               ` Kevin Rodgers
     [not found]               ` <mailman.16.1296528605.21328.help-gnu-emacs@gnu.org>
2011-02-01 16:52                 ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=OF2A593A0A.61E3C88D-ON8525781A.006E91C6-8525781A.0070D1BA@us.ibm.com \
    --to=kgoldman@us.ibm.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).