emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: IDE features: M-x find-grep


From: Juri Linkov
Subject: Re: IDE features: M-x find-grep
Date: Sat, 03 May 2008 02:46:34 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (x86_64-pc-linux-gnu)

>> "find-grep" lists the matches too under the CVS, .svn, .git, ... directories.
>
> M-x rgrep doesn't...

Then why this very useful command is hidden from the users?
Maybe add it to the menu?

Also what do you think about ignoring more useless files in rgrep and lgrep
like below?

Index: emacs/lisp/progmodes/grep.el
@@ -690,7 +702,16 @@
        (setq command (grep-expand-template
                       grep-template
                       regexp
-                      files))
+                      files
+                      (concat "\\("
+                              (and completion-ignored-extensions
+                                   (concat " -name '*"
+                                           (mapconcat #'identity
+                                                      
completion-ignored-extensions
+                                                      "' -o -name '*")
+                                           "'"))
+                              " -name '*~' -o -name '#*' -o -name '.#*' \\) -o 
")
+                      ))
        (when command
          (if (equal current-prefix-arg '(4))
              (setq command
@@ -768,7 +789,17 @@
                                               " -o -path ")
                                    " "
                                    (shell-quote-argument ")")
-                                   " -prune -o ")))))
+                                   " -prune -o "
+                                   (shell-quote-argument "(")
+                                   (and completion-ignored-extensions
+                                        (concat " -name '*"
+                                                (mapconcat #'identity
+                                                           
completion-ignored-extensions
+                                                           "' -o -name '*")
+                                                "'"))
+                                   " -name '*~' -o -name '#*' -o -name '.#*' "
+                                   (shell-quote-argument ")") " -o "
+                                   )))))
        (when command
          (if current-prefix-arg
              (setq command

-- 
Juri Linkov
http://www.jurta.org/emacs/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]