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

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

Re: find-grep-dired - default directory to start with


From: Bobby Casey
Subject: Re: find-grep-dired - default directory to start with
Date: Tue, 28 Jul 2015 10:27:30 -0400

On Tue, Jul 28, 2015 at 8:43 AM, Dmitry Gutov <dgutov@yandex.ru> wrote:

> On 07/28/2015 03:25 PM, Martin Barth wrote:
>
>  I am looking for a alternatetive function where this "Start directory"
>> can be predefined.
>> basically
>>
>> (setq my-default-search-dir '/home/foo/bar);
>>
>> and then M-x find-grep-dired-in-my-default-search-dir
>>
>
> Define your own my-find-grep-dired, copy the definition of find-grep-dired
> there, and change it to use my-default-search-dir.
>
> Should be easy.
>
>
Wouldn't a wrapper be more appropriate?  Something like this:

(defvar my-find-grep-dired-default "/tmp/"
  "Specifies the default search directory for my-find-grep-dired")
(defun my-find-grep-dired (regexp)
  (find-grep-dired my-find-grep-dired-default regexp))


reply via email to

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