bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#4301: rgrep/lgrep defaults


From: Juri Linkov
Subject: bug#4301: rgrep/lgrep defaults
Date: Thu, 10 Sep 2009 04:07:17 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (x86_64-pc-linux-gnu)

Currently reading a file name pattern in rgep/lgrep provides no completion.
I think it would be better to provide file completion for the case when
the user wants to limit the search to one particular file in the current
directory, or to build a file name pattern based on the file in the
current directory.

Index: lisp/progmodes/grep.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/progmodes/grep.el,v
retrieving revision 1.107
diff -c -r1.107 grep.el
*** lisp/progmodes/grep.el      10 Sep 2009 00:57:44 -0000      1.107
--- lisp/progmodes/grep.el      10 Sep 2009 01:06:46 -0000
***************
*** 788,799 ****
               default-extension
               (car grep-files-history)
               (car (car grep-files-aliases))))
!        (files (read-string
                 (concat "Search for \"" regexp
                         "\" in files"
                         (if default (concat " (default " default ")"))
                         ": ")
!                nil 'grep-files-history
                 (delete-dups
                  (delq nil (append (list default default-alias 
default-extension)
                                    (mapcar 'car grep-files-aliases)))))))
--- 788,800 ----
               default-extension
               (car grep-files-history)
               (car (car grep-files-aliases))))
!        (files (completing-read
                 (concat "Search for \"" regexp
                         "\" in files"
                         (if default (concat " (default " default ")"))
                         ": ")
!                'read-file-name-internal
!                nil nil nil 'grep-files-history
                 (delete-dups
                  (delq nil (append (list default default-alias 
default-extension)
                                    (mapcar 'car grep-files-aliases)))))))

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





reply via email to

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