From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?ISO-8859-1?Q?Andreas_R=F6hler?= Newsgroups: gmane.emacs.help Subject: Re: using find-grep in emacs Date: Wed, 15 May 2013 20:51:57 +0200 Message-ID: <5193D94D.7080007@easy-emacs.de> References: <3477d0ac-7526-4dd7-bc43-7dca9edb1d23@googlegroups.com> <0aa2bea2-27b8-4486-9440-f76e22fea2b1@googlegroups.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1368643781 6275 80.91.229.3 (15 May 2013 18:49:41 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 15 May 2013 18:49:41 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed May 15 20:49:41 2013 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 1Ucglh-0003KB-7m for geh-help-gnu-emacs@m.gmane.org; Wed, 15 May 2013 20:49:41 +0200 Original-Received: from localhost ([::1]:52296 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ucglg-0006zw-Lv for geh-help-gnu-emacs@m.gmane.org; Wed, 15 May 2013 14:49:40 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:42121) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UcglU-0006yp-Hc for help-gnu-emacs@gnu.org; Wed, 15 May 2013 14:49:30 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UcglT-0002Rv-60 for help-gnu-emacs@gnu.org; Wed, 15 May 2013 14:49:28 -0400 Original-Received: from moutng.kundenserver.de ([212.227.126.171]:53781) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UcglS-0002Rl-Rm for help-gnu-emacs@gnu.org; Wed, 15 May 2013 14:49:27 -0400 Original-Received: from [192.168.178.21] (brln-4db9f307.pool.mediaWays.net [77.185.243.7]) by mrelayeu.kundenserver.de (node=mrbap3) with ESMTP (Nemesis) id 0M4rAD-1UJUJk1SMX-00yz2m; Wed, 15 May 2013 20:49:25 +0200 User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130329 Thunderbird/17.0.5 In-Reply-To: <0aa2bea2-27b8-4486-9440-f76e22fea2b1@googlegroups.com> X-Provags-ID: V02:K0:ngFvHFICo9L4TvV8aFfUUTNBRGZ3mCwKGHpMObD2IJW Y3RhYnt9NkTgqi8fBrjm18SFfEaJD9pDbvRvSZ2pVeuhdlYMVY jVEVX2GQUjMsQLvI9XQtTctDDlrNwaxH0hFXMfjd9zYXaxseIj jQ3cNAVMpJjjDd/NbSz3VjdOX/R5tHnTbWQXwUPgyU4F67HvjH GmEEKnCW/fizLQl9ef8PAj7luBN0Gdmf0uqonw54ZckFhvMp3r MrogjzmPg/YxhajnBxEl9heKgag+YERFDNEpMfvwMYpzjxmX6D VfHR7IHWG7EpusQY+GyvGjOJbVLUt68LwACXZAr+xffhS0U0n3 ityfedcod12cuIhEblgDXNpCqr7N0sNLoFZ68ai7Y X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 212.227.126.171 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:90819 Archived-At: Am 15.05.2013 20:25, schrieb Rami A: > Thank you all for your feedback. > I am actually using 2 emacs binaries "24.3.1" and "23.3.1". > > I am trying to bind all this command that also defaults to search only [*.shc] files. > How can I do that? > > Basically I want to be able to hit for example F1 and simply type the pattern I am looking for without continuously adding the [*.shc]. > > Also I would like emacs to ask the default folder to look for the pattern underneath only once. > > Was not able to find a way to achieve all of that. > M-x customize-variable RET grep-find-command RET If that's not enough, for example as I like to change switch some parameters quite often, write your own commands. The command below uses -maxdepth 9, while another aliased gf1 uses -maxdepth 1 etc. (defalias 'gf9 'neun-grep-find) (defun neun-grep-find () (interactive) (grep-apply-setting 'grep-find-command "find . -maxdepth 9 -type f -name \"*.el\" -print0 | xargs -0 -e grep -nH -e ") (grep-find (car (progn (grep-compute-defaults) (list (read-shell-command "Run find (like this): " grep-find-command 'grep-find-history))))))