[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Default compile directory
From: |
Ivan Kanis |
Subject: |
Re: Default compile directory |
Date: |
Tue, 18 Aug 2009 07:38:25 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) |
> Is there any way to set default compile directory?
>
> The problem: I have a many sub-folders in my project and when I edit a
> file deep inside subfolders and do M-x compile, I end up running make
> in that subfolder, instead of the root folder. Is there any way for
> Emacs to always run compile in the default folder?
>
> One thing I figured was to change default compile command to be: cd
> <project's root folder>; make. Is that the only/best way?
Hi Sumit,
You can use .dir-locals.el in your root folder and put something like:
(setq compile-command "cd <root folder>; make")
It will be evaluated every time you open a file in the folder. I think
it's a new feature of emacs 23.
Kind regards,
--
Ivan
Kanis http://kanis.fr
We know what we are, but know not what we may be.
-- William Shakespeare
Sumit Narayan <sumnaray@gmail.com> wrote:
Re: Default compile directory, Nikolaj Schumacher, 2009/08/18