I'm trying to run the rgrep command from a small Emacs Lisp utility, but I'm getting an odd error. The command description is:
rgrep is an interactive compiled Lisp function.
(rgrep REGEXP &optional FILES DIR CONFIRM)
Recursively grep for REGEXP in FILES in directory tree rooted at DIR. The search is limited to file names matching shell pattern FILES. FILES may use abbreviations defined in
grep-files-aliases', e.g. entering
ch' is equivalent to `*.[ch]'.With C-u prefix, you can edit the constructed shell command line before it is executed. With two C-u prefixes, directly edit and run `grep-find-command'.
Collect output in a buffer. While find runs asynchronously, you can use C-x ` (M-x next-error), or RET in the grep output buffer, to go to the lines where grep found matches.
This command shares argument histories with M-x lgrep and M-x grep-find.
I try to run:
(rgrep "something" "all" "~/projects/")
and I get
*** Eval error *** Wrong type argument: stringp, nil
Obviously all the params are strings, so I cannot understand where is this nil coming from.
I'm running Emacs 23.3 on Debian Testing.
Thanks in advance for your help!
emacs -q
). Also, before you run it, add(setq debug-on-error t)
to get a backtrace which will provide more info. – Trey Jackson