From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ivan Kanis Newsgroups: gmane.emacs.help Subject: Re: Default compile directory Date: Tue, 18 Aug 2009 07:38:25 +0200 Message-ID: <87my5xlm0e.fsf@kanis.fr> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1250605491 29906 80.91.229.12 (18 Aug 2009 14:24:51 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 18 Aug 2009 14:24:51 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Sumit Narayan Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Aug 18 16:24:44 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MdPc8-00056u-PH for geh-help-gnu-emacs@m.gmane.org; Tue, 18 Aug 2009 16:24:41 +0200 Original-Received: from localhost ([127.0.0.1]:34109 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MdPc8-0000c1-47 for geh-help-gnu-emacs@m.gmane.org; Tue, 18 Aug 2009 10:24:40 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MdHSe-0003UE-R6 for help-gnu-emacs@gnu.org; Tue, 18 Aug 2009 01:42:20 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MdHSc-0003Rq-BP for help-gnu-emacs@gnu.org; Tue, 18 Aug 2009 01:42:19 -0400 Original-Received: from [199.232.76.173] (port=43812 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MdHSc-0003Re-70 for help-gnu-emacs@gnu.org; Tue, 18 Aug 2009 01:42:18 -0400 Original-Received: from kanis.fr ([75.127.73.245]:4718) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MdHSb-0007qX-Q2 for help-gnu-emacs@gnu.org; Tue, 18 Aug 2009 01:42:17 -0400 Original-Received: from if02t2-89-83-137-164.d4.club-internet.fr ([89.83.137.164] helo=zen) by kanis.fr with esmtpsa (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.63) (envelope-from ) id 1MdHSV-0006DL-BW; Tue, 18 Aug 2009 01:42:11 -0400 In-Reply-To: (Sumit Narayan's message of "Mon, 17 Aug 2009 17:12:49 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. X-Mailman-Approved-At: Tue, 18 Aug 2009 10:24:12 -0400 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:67248 Archived-At: > 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 > ; 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 ; 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 wrote: