Today we discuss
    |(defun find-grep-dired (dir regexp)
    |  "Find files in DIR containing a regexp REGEXP and start Dired on output.
    |The command run (after changing into DIR) is
    |
    |    find . -exec grep -s -e REGEXP {} \\\; -ls
No it isn't, see the -f below
    |Thus ARG can also contain additional grep options."
    |  (interactive "DFind-grep (directory): \nsFind-grep (grep regexp): ")
    |  ;; find -exec doesn't allow shell i/o redirections in the command,
    |  ;; or we could use `grep -l >/dev/null'
    |  ;; We use -type f, not ! -type d, to avoid getting screwed
    |  ;; by FIFOs and devices.  I'm not sure what's best to do
    |  ;; about symlinks, so as far as I know this is not wrong.
    |  (find-dired dir
    |              (concat "-type f -exec grep " find-grep-options " -e "
    |                      (shell-quote-argument regexp)
    |                      " {} \\\; ")))
What "really burns me" is that there is no way to tell it I want to
use zgrep or pcregrep instead of grep.

Naw, need complete freedom like M-x grep...
(Apropos grep shows lots but I didn't try them.)


_______________________________________________
emacs-pretest-bug mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug

Reply via email to