As someone who's thought about learning elisp, I'd say your first effort
sets a high standard! :)
I have a suggested modification: I think the line
"find %s %s -type f | xargs grep %s -n \"%s\""
is improved by this
"find %s %s -type f | xargs grep %s -n \"%s\" /dev/null"
(not sure if you need to escape the slashes.)
This way, grep won't miss any hits in the last file that find produces.
Also, I think there is a way to handle file names with spaces in them by
using a print0 argument to find, but I have never been able to get that to
work on my NT / cygwin box.
> -----Original Message-----
> From: Guillaume Berche [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, April 05, 2001 5:50 AM
> To: [EMAIL PROTECTED]
> Subject: CONTRIB: recursive search in files of the current
> JDE project
>
>
> Hello,
>
> I eventually got some time to spend learning emacs-lisp (by
> the way the
> elisp-introduction available at
> http://www.gnu.org/manual/emacs-lisp-intro/emacs-lisp-intro.html is
> really a great document to start learning elisp), and finally started
> implementing a new feature that I had been wishing the JDE to have.
>
> So attached, it my first lisp function to search a string into all of
> the current JDE project files. It is merely a customization of the
> standard "grep" command to use the JDE customization variables (mainly
> the path to the source files). Please let me know what you
> think and how
> to improve it!
>
> To use it, include the file in your .emacs file (after
> loading the jde)
> and type "M-x jde-grep-find"
> Its behavior can be customized, type "C-h f jde-grep-find"
> for details.
>
> Cheers,
>
> Guillaume.
>