unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: "E.L.K." <some.any.key@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: Per-directory init files?
Date: Tue, 9 Sep 2008 22:47:31 +0300	[thread overview]
Message-ID: <20080909194731.GA20063@elkbook> (raw)
In-Reply-To: <roy-4B1F20.09253127082008@news.panix.com>

On Wed, Aug 27, 2008 at 09:25:32AM -0400, Roy Smith wrote:
> Is there any way to have per-directory init files?
> 
> I've got a directory where I need to run "./install" after each round of 
> edits to any file in that directory.  What I'd like to do is make 
> "./install" my default compile command, but only when I'm in that 
> directory.  How can I do that?
> 
> I'm running GNU Emacs 22.1.1 on OSX-10.5.  Amazingly enough, OSX doesn't 
> seem to ship with make, so I can't just put a Makefile in my directory with 
> "./install" as the default action :-(

You can, actually, place in your ~/.emacs something like that:

(if (file-readable-p ".vars")
(load-file ".vars")
)

so, when emacs will be started in some directory, it will check
if there ".vars" file there (as .emacs executed there) and if so,
will load it.

and in file ".vars" you can place 
(setq compile-command "./install")

i haven't tested this, but this should work

-- 
E.L.K.
Tuesday, 09 of September, 2008, 22:45

зы. C_U_L8r!




      parent reply	other threads:[~2008-09-09 19:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-27 13:25 Per-directory init files? Roy Smith
2008-08-28 15:14 ` Peter Dyballa
2008-08-28 16:09 ` Nikolaj Schumacher
2008-09-09 19:47 ` E.L.K. [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=20080909194731.GA20063@elkbook \
    --to=some.any.key@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /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).