[darcs-users] code search tips (Re: hoogle web search for darcs)

Trent W. Buck trentbuck at gmail.com
Sat Oct 4 05:28:12 UTC 2008


Tommy Pettersson <ptp at lysator.liu.se> writes:

> On Sat, Sep 27, 2008 at 12:05:39PM -0700, Simon Michael wrote:
>> David Roundy wrote:
>> > grep -r functionName src | grep hs: | grep -v Context.hs
>> 
>> Ouch.. I do a little better than that, in emacs:
>> 
>> M-x rgrep, <pattern>, *hs, ~/src/darcs/src
>   grep -rn functionName src |grep hs: |grep -v Context.hs

I generally use "M-x grep RET find -name \*.hs -exec grep -nH foo {} +",
because I know how to drive unix and I don't like four prompts.

>> greps for pattern in haskell files under darcs/src and provides a 
>> clickable list. Maybe only in emacs >= 22.2.

M-x grep exists in Emacs21, but the output became clickable in Emacs 22.

> For convenience I have the above command, with extra .svn, _darcs, etc
> stuff

You can do that without resorting to repeated grep -v'ing:

    find \( -name .svn -o -name _darcs \) -prune -o \
      -name \*.hs -exec grep -nH foo {} +



More information about the darcs-users mailing list