[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to make to go to the base directory of project before calling th
From: |
hazlup |
Subject: |
Re: How to make to go to the base directory of project before calling the compile command.? |
Date: |
Tue, 16 Jun 2009 13:35:13 -0700 (PDT) |
Davin Pearson wrote:
>
> On Jun 16, 2:29 pm, Davin Pearson <davin.pear...@gmail.com> wrote:
>> On Jun 3, 10:10 pm, Anand Dhanakshirur <a...@cdotb.ernet.in> wrote:
>>
>> > Hi,
>> > I am using ede and cedet tools.
>> > I have created the project by writing the required things in .emacs
>> file.
>> > What i want is,
>> > whenever i want to compile(<f6> key is bound to compile command)
>> > it should go to the base directory on its own and prompt with a compile
>> > command,
>> > I don't want to go to the base directory of the project by command M-x
>> cd
>> > every time i want to compile.
>> > How to do that?
>> > Is there an lisp code for that?
>> > Anand
>>
>> > asd.vcf
>> > < 1KViewDownload
>>
>> Try this code:
>>
>> (global-set-key [f6] 'f6)
>>
>> (defun f6 ()
>> (interactive)
>> (cd "<base dir>")
>> (execute-kbd-macro "\M-xcompile\n")
>> )
>
> Try this:
>
> (global-set-key [f6] 'f6)
>
> (defun f6 ()
> (interactive)
> (dired "<base dir>")
> (execute-kbd-macro "\M-xcompile\n")
> )
>
> where <base dir> is replaced by the name of your base dir.
>
>
M-x compile
cd base-dir && your-build-command-here
There is a compile history, so all your choices are stacked up and
scrollable via f6 (in your case) M-p.
Otherwise you need an expression that will transform your cwd into the
proper parent. This requires one to follow some strict and predictable
naming/check-out pattern
--
View this message in context:
http://www.nabble.com/Re%3A-How-to-make-to-go-to-the-base-directory-of-project-before-calling-the-compile-command.--tp24046630p24062334.html
Sent from the Emacs - Help mailing list archive at Nabble.com.