From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Bobby Casey Newsgroups: gmane.emacs.help Subject: Re: find-grep-dired - default directory to start with Date: Tue, 28 Jul 2015 10:27:30 -0400 Message-ID: References: <55B774B6.4090901@senfdax.de> <55B7790B.1090208@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1438093743 4253 80.91.229.3 (28 Jul 2015 14:29:03 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 28 Jul 2015 14:29:03 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Dmitry Gutov Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Jul 28 16:28:58 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZK5sH-0001rD-M8 for geh-help-gnu-emacs@m.gmane.org; Tue, 28 Jul 2015 16:28:57 +0200 Original-Received: from localhost ([::1]:58915 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZK5sG-0002w9-Q2 for geh-help-gnu-emacs@m.gmane.org; Tue, 28 Jul 2015 10:28:56 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36182) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZK5s5-0002vR-Ep for help-gnu-emacs@gnu.org; Tue, 28 Jul 2015 10:28:46 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZK5rz-0006fP-Hc for help-gnu-emacs@gnu.org; Tue, 28 Jul 2015 10:28:45 -0400 Original-Received: from mail-pa0-f47.google.com ([209.85.220.47]:34459) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZK5rz-0006Yb-CK for help-gnu-emacs@gnu.org; Tue, 28 Jul 2015 10:28:39 -0400 Original-Received: by pacan13 with SMTP id an13so72164107pac.1 for ; Tue, 28 Jul 2015 07:27:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=1/QbpcmMHJumb7CflQrcjbAaRJ3RIR8tD0yND6h/+uI=; b=dPtRV77M756bkt79FDc1EyC8Sb+X9BlxHvmxPiwqhUi9eCFaZM+A4Zwj58JDZ2+ICo 31AxSJ5ljN8cBXNogcKd7T1s+xjXf5vILjJ05G1AWi6M0dIWNjaYjFK2eFfVaNL1iHbo pSegDEiXDpRLw4EL4YU82A1JLEwbizQTY3dcO4o0J+X5SKTsloBHl7CbciPhwxmxtFB5 BhqB9aggvbvY9s++F+Pa6eihp/gxbVC64EZ0w7RwF+iqhVX3bBRDjGjHZGTPhD8ix9j/ Hlvol5eCllfL1WSek34YVFUxyAKtnbs9yP+4v697n57Yr4Ak0A78dwXm0Ww2cAlc6HSu k+0A== X-Received: by 10.66.222.41 with SMTP id qj9mr82696565pac.139.1438093650661; Tue, 28 Jul 2015 07:27:30 -0700 (PDT) Original-Received: by 10.66.74.41 with HTTP; Tue, 28 Jul 2015 07:27:30 -0700 (PDT) In-Reply-To: <55B7790B.1090208@yandex.ru> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.85.220.47 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:106068 Archived-At: On Tue, Jul 28, 2015 at 8:43 AM, Dmitry Gutov 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))