title: Executing rgrep non-interactively
body: <p>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:</p>
  
  <blockquote>
    <p>rgrep is an interactive compiled Lisp function.</p>
    
    <p>(rgrep REGEXP &amp;optional FILES DIR CONFIRM)</p>
    
    <p>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 <code>grep-files-aliases', e.g.
    entering</code>ch' is equivalent to `*.[ch]'.</p>
    
    <p>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'.</p>
    
    <p>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.</p>
    
    <p>This command shares argument histories with M-x lgrep and M-x
    grep-find.</p>
  </blockquote>
  
  <p>I try to run:</p>
  
  <pre><code>(rgrep "something" "all" "~/projects/")
  </code></pre>
  
  <p>and I get </p>
  
  <pre><code> *** Eval error ***  Wrong type argument: stringp, nil
  </code></pre>
  
  <p>Obviously all the params are strings, so I cannot understand where is this nil coming from.</p>
  
  <p>I'm running Emacs 23.3 on Debian Testing.</p>
  
  <p>Thanks in advance for your help!</p>