Per-directory init files?
  Home FAQ Contact Sign in
gnu.emacs.help only
 
Advanced search
POPULAR GROUPS

more...

gnu.emacs.help Profile…
 Up
Per-directory init files?         


Author: Roy Smith
Date: Aug 27, 2008 06:25

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 :-(
3 Comments
Re: Per-directory init files?         


Author: Peter Dyballa
Date: Aug 28, 2008 08:14

Am 27.08.2008 um 15:25 schrieb Roy Smith:
> 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 :-(

Have you looked into the developer metapackage?

--
Greetings

Pete

There is no worse tyranny than to force a man to pay for what he does
not want merely because you think it would be good for him.
– Robert Heinlein
no comments
Re: Per-directory init files?         


Author: Nikolaj Schumacher
Date: Aug 28, 2008 09:09

Roy Smith panix.com> 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?

Emacs 23 will have support for directory-local variables.

For now you can use
http://www.emacswiki.org/cgi-bin/emacs/project-local-variables.el

See also:
http://www.emacswiki.org/cgi-bin/wiki/ProjectSettings
> Amazingly enough, OSX doesn't seem to ship with make

As Peter said, you'll need to install the Developer tools.

regards,
Nikolaj Schumacher
no comments
Re: Per-directory init files?         


Author: E.L.K.
Date: Sep 9, 2008 12:47

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.
Show full article (1.01Kb)
no comments