unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* How to make to go to the base directory of project before calling the compile command.?
@ 2009-06-03 10:10 Anand Dhanakshirur
  0 siblings, 0 replies; 5+ messages in thread
From: Anand Dhanakshirur @ 2009-06-03 10:10 UTC (permalink / raw)
  To: emacs help

[-- Attachment #1: Type: text/plain, Size: 435 bytes --]

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




[-- Attachment #2: asd.vcf --]
[-- Type: text/x-vcard, Size: 177 bytes --]

begin:vcard
fn:Anand Dhanakshirur
n:Dhanakshirur;Anand
email;internet:asd@cdotb.ernet.in
tel;work:(080)-25119295
tel;cell:9886178750
x-mozilla-html:FALSE
version:2.1
end:vcard


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: How to make to go to the base directory of project before calling the compile command.?
       [not found] <mailman.8410.1244023243.31690.help-gnu-emacs@gnu.org>
@ 2009-06-16  2:29 ` Davin Pearson
  2009-06-16  3:13   ` Davin Pearson
  0 siblings, 1 reply; 5+ messages in thread
From: Davin Pearson @ 2009-06-16  2:29 UTC (permalink / raw)
  To: help-gnu-emacs

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")
  )




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: How to make to go to the base directory of project before calling the compile command.?
  2009-06-16  2:29 ` How to make to go to the base directory of project before calling the compile command.? Davin Pearson
@ 2009-06-16  3:13   ` Davin Pearson
  2009-06-16 20:35     ` hazlup
  0 siblings, 1 reply; 5+ messages in thread
From: Davin Pearson @ 2009-06-16  3:13 UTC (permalink / raw)
  To: help-gnu-emacs

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.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: How to make to go to the base directory of project before calling the compile command.?
  2009-06-16  3:13   ` Davin Pearson
@ 2009-06-16 20:35     ` hazlup
  0 siblings, 0 replies; 5+ messages in thread
From: hazlup @ 2009-06-16 20:35 UTC (permalink / raw)
  To: Help-gnu-emacs



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.





^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: How to make to go to the base directory of project before calling the compile command.?
       [not found] <mailman.740.1245192433.2239.help-gnu-emacs@gnu.org>
@ 2009-06-18  0:07 ` jidanni
  0 siblings, 0 replies; 5+ messages in thread
From: jidanni @ 2009-06-18  0:07 UTC (permalink / raw)
  To: help-gnu-emacs

Maybe put at the bottom of your file(s):
# Local Variables:
# compile-command: "cd ~/NERDSBERG && make snitwit"
# End:




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-06-18  0:07 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <mailman.8410.1244023243.31690.help-gnu-emacs@gnu.org>
2009-06-16  2:29 ` How to make to go to the base directory of project before calling the compile command.? Davin Pearson
2009-06-16  3:13   ` Davin Pearson
2009-06-16 20:35     ` hazlup
     [not found] <mailman.740.1245192433.2239.help-gnu-emacs@gnu.org>
2009-06-18  0:07 ` jidanni
2009-06-03 10:10 Anand Dhanakshirur

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).