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

Simon Michael simon at joyful.com
Sat Sep 27 19:05:39 UTC 2008


David Roundy wrote:
> Applied, thanks! Maybe some day this will replace
> 
> 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.

Some darcs repos have code at the top level so I also have this in 
custom-set-variables in .emacs:

   '(grep-find-ignored-directories (quote ("CVS" ".svn" "{arch}" ".hg" 
"_darcs" ".git" ".bzr" "php-5.1.6" "html2ps_v2" "phpm\
ailer" "smarty" "compile" "doc" "TAGS" "*~")))

Ie ignore _darcs, generated doc files, tags, emacs backups etc. You 
could add Context.hs to this.

I sometimes use tags-search and tags-apropos, but rgrep gives the 
clearest and quickest overview so that's my current workhorse.

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.



More information about the darcs-users mailing list