unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Kevin Rodgers <ihs_4664@yahoo.com>
Subject: Re: dir-specific grep-find-command?
Date: Fri, 20 Jun 2003 09:07:39 -0600	[thread overview]
Message-ID: <3EF3233B.9050402@yahoo.com> (raw)
In-Reply-To: 87brwuvedb.fsf@cs.uga.edu

Ed L Cashin wrote:

> Kevin Rodgers <ihs_4664@yahoo.com> writes:
>>(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.

After 20 years of using Emacs, I just knew about them.


But all conventional modes have a hook, so dired-mode-hook should have
been obvious.  And then rather than trying to predict what kind of files
might be in your kernel directory structure (i.e. what modes might be
used and thus hooks might need to be added to), the standard hook to use
is find-file-hooks (and find-file-not-found-hooks for new files).

-- 
<a href="mailto:&lt;kevin.rodgers&#64;ihs.com&gt;">Kevin Rodgers</a>

      reply	other threads:[~2003-06-20 15:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-06-15 23:54 dir-specific grep-find-command? Ed L Cashin
2003-06-17 19:10 ` Kevin Rodgers
2003-06-19  5:13   ` Ed L Cashin
2003-06-20 15:07     ` Kevin Rodgers [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3EF3233B.9050402@yahoo.com \
    --to=ihs_4664@yahoo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).