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

Tommy Pettersson ptp at lysator.liu.se
Sat Oct 4 00:30:25 UTC 2008


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
> 
> greps for pattern in haskell files under darcs/src and provides a 
> clickable list. Maybe only in emacs >= 22.2.
[...]
> I wonder what proportion of darcs devs use emacs, and therefore find 
> emacs tips relevant. I'm interested in hearing such tips from others 
> (all tools), since they can make us more effective.

Here's how it's done using wily:

  grep -rn functionName src |grep hs: |grep -v Context.hs

It provides a clickable list!!  :-)

For convenience I have the above command, with extra .svn,
_darcs, etc stuff in an executable sh file (well, it's actually
an rc file, plan9 shell), so I just type:

  grh functionName

Well, actually I usually already have the text grh in a
"tagline" or some guide buffer, so I just click on the
functionName and then click on grh, to get the list, and then
click in the list to get to the right file and line.



-- 
Tommy Pettersson <ptp at lysator.liu.se>


More information about the darcs-users mailing list