From: Sumit Narayan <sumnaray@gmail.com>
To: Ivan Kanis <expire-by-2009-08-23@kanis.fr>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Default compile directory
Date: Tue, 18 Aug 2009 15:59:14 -0400 [thread overview]
Message-ID: <a18f491d0908181259t56d8f543jce17a7fdf29ff53d@mail.gmail.com> (raw)
In-Reply-To: <87my5xlm0e.fsf@kanis.fr>
Thanks.
This is what I did:
Added
((nil . ((setq compile-command "cd <project root directory>; make"))))
in <project root directory>/.dir-locals.el.
When I open any file inside this folder, I am asked for permission to
apply the local variables
setq : (compile-command "cd <project root directory>; make")
For some reason, my response as 'y' or '!' does not make a difference.
When I give M-x compile, I still end up with "make -k".
Any idea why?
Thanks,
Sumit.
On Tue, Aug 18, 2009 at 1:38 AM, Ivan
Kanis<expire-by-2009-08-23@kanis.fr> wrote:
>
>> 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:
>
next prev parent reply other threads:[~2009-08-18 19:59 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-17 21:12 Default compile directory Sumit Narayan
2009-08-18 5:38 ` Ivan Kanis
2009-08-18 19:59 ` Sumit Narayan [this message]
[not found] ` <mailman.5018.1250860038.2239.help-gnu-emacs@gnu.org>
2009-08-21 14:32 ` A.Politz
2009-08-21 15:23 ` Sumit Narayan
2009-08-25 15:35 ` Sumit Narayan
2009-08-18 8:15 ` Peter Dyballa
2009-08-18 20:08 ` Sumit Narayan
2009-08-18 21:51 ` Nikolaj Schumacher
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a18f491d0908181259t56d8f543jce17a7fdf29ff53d@mail.gmail.com \
--to=sumnaray@gmail.com \
--cc=expire-by-2009-08-23@kanis.fr \
--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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.