From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Ed L Cashin Newsgroups: gmane.emacs.help Subject: Re: dir-specific grep-find-command? Date: Thu, 19 Jun 2003 01:13:36 -0400 Organization: negia.net Sender: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <87brwuvedb.fsf@cs.uga.edu> References: <87znki6gnb.fsf@cs.uga.edu> <3EEF67A0.1020507@yahoo.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1055999792 12053 80.91.224.249 (19 Jun 2003 05:16:32 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Thu, 19 Jun 2003 05:16:32 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Thu Jun 19 07:16:31 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19Srmg-00038F-00 for ; Thu, 19 Jun 2003 07:16:31 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.20) id 19Srlb-0007Pt-NQ for gnu-help-gnu-emacs@m.gmane.org; Thu, 19 Jun 2003 01:15:23 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!sn-xit-03!sn-xit-04!sn-xit-01!sn-post-01!supernews.com!corp.supernews.com!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.090014 (Oort Gnus v0.14) Emacs/21.2 (i386-debian-linux-gnu) Cancel-Lock: sha1:K6GmMlQGwNWk9R0ikhSQPvFTyNA= Cache-Post-Path: alpha.negia.net!unknown@ppp63-172-85-115.silverstreakdsl.com X-Cache: nntpcache 2.4.0b5 (see http://www.nntpcache.org/) Original-X-Complaints-To: abuse@supernews.com Original-Lines: 23 Original-Xref: shelby.stanford.edu gnu.emacs.help:114572 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:11064 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:11064 Kevin Rodgers writes: > Ed L Cashin wrote: [ugly override of grep-find] ... > How about something like this: > > (defun in-kernel-hook () > "If `in-kernel', override global `grep-find-command' value." > (if (in-kernel 0) > (set (make-local-variable 'grep-find-command) "kern-grep-find"))) > > (add-hook 'find-file-hooks 'in-kernel-hook) > (add-hook 'dired-mode-hook 'in-kernel-hook) Excellent! That seems to do exactly what I wanted. Did you already know about those hooks or did you just know how to find them, because I guess I failed to find them. -- --Ed L Cashin PGP public key: http://noserose.net/e/pgp/