[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: |
Davin Pearson |
Subject: |
Re: How to make to go to the base directory of project before calling the compile command.? |
Date: |
Mon, 15 Jun 2009 20:13:50 -0700 (PDT) |
User-agent: |
G2/1.0 |
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.