help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: selected word as parameter to function


From: Drew Adams
Subject: RE: selected word as parameter to function
Date: Mon, 3 Nov 2008 12:13:42 -0800

> I would like to create a function that would execute:
> 
> grep -nH -R --include="*.cpp" --include="*.h" --include ="*.c" -e 
> "'selected-word'" .
> 
> Where 'selected-word' would be the word where the cursor is 
> at (or below?).

See the code in grep+.el, which does that. See option `grepp-default-regexp-fn'
and how it is used. 

(In addition, if the region is active, `grep' (in grep+.el) puts quotes around
it and uses that as the search string instead of the cursor word.)

http://www.emacswiki.org/emacs/grep%2b.el (code)

http://www.emacswiki.org/emacs/GrepPlus (doc)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]