* compile in specific folder
@ 2007-06-20 9:51 Martin
2007-06-20 12:59 ` Peter Dyballa
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Martin @ 2007-06-20 9:51 UTC (permalink / raw)
To: help-gnu-emacs
Hi,
I am using emacs to work on a project that needs to be compiled (call
make) in a specific folder, independent of the current buffer.
At the moment I am using this:
(global-set-key [(f9)] 'my-compile)
(defun my-compile ()
"compile in our standard directory"
(interactive)
(cd mypath)
(call-interactively 'compile)
)
However, this has the drawback that after a compile my minibuffer
always starts in mypath instead of the current buffer's path.
Any ideas there?
And while we're on the topic of compiling.
How do I make compile to be non-interactive?
=> I want to be able to define a key for "make all" and one for just
"make.
Thanks in advance
Martin
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: compile in specific folder
2007-06-20 9:51 compile in specific folder Martin
@ 2007-06-20 12:59 ` Peter Dyballa
2007-06-20 14:32 ` Denis Bueno
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Peter Dyballa @ 2007-06-20 12:59 UTC (permalink / raw)
To: Martin; +Cc: help-gnu-emacs
Am 20.06.2007 um 11:51 schrieb Martin:
> However, this has the drawback that after a compile my minibuffer
> always starts in mypath instead of the current buffer's path.
> Any ideas there?
Open in dired-mode mypath and start to compile!
--
Mit friedvollen Grüßen
Pete
Time is an illusion. Lunchtime, doubly so.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: compile in specific folder
2007-06-20 9:51 compile in specific folder Martin
2007-06-20 12:59 ` Peter Dyballa
@ 2007-06-20 14:32 ` Denis Bueno
2007-06-20 16:32 ` Tom Tromey
[not found] ` <mailman.2446.1182351242.32220.help-gnu-emacs@gnu.org>
3 siblings, 0 replies; 5+ messages in thread
From: Denis Bueno @ 2007-06-20 14:32 UTC (permalink / raw)
To: Martin, help-gnu-emacs
[-- Attachment #1.1: Type: text/plain, Size: 766 bytes --]
On 06/20/2007 03:51, "Martin" <m.gercke@gmail.com> wrote:
> Hi,
>
> I am using emacs to work on a project that needs to be compiled (call
> make) in a specific folder, independent of the current buffer.
> At the moment I am using this:
>
> (global-set-key [(f9)] 'my-compile)
>
> (defun my-compile ()
> "compile in our standard directory"
> (interactive)
> (cd mypath)
> (call-interactively 'compile)
> )
>
> However, this has the drawback that after a compile my minibuffer
> always starts in mypath instead of the current buffer's path.
> Any ideas there?
Perhaps an alternate definition will suffice?
(defun my-compile ()
(interactive)
(let ((default-directory mypath))
(call-interactively 'compile)))
-Denis
[-- Attachment #1.2: Type: text/html, Size: 1481 bytes --]
[-- Attachment #2: Type: text/plain, Size: 152 bytes --]
_______________________________________________
help-gnu-emacs mailing list
help-gnu-emacs@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gnu-emacs
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: compile in specific folder
2007-06-20 9:51 compile in specific folder Martin
2007-06-20 12:59 ` Peter Dyballa
2007-06-20 14:32 ` Denis Bueno
@ 2007-06-20 16:32 ` Tom Tromey
[not found] ` <mailman.2446.1182351242.32220.help-gnu-emacs@gnu.org>
3 siblings, 0 replies; 5+ messages in thread
From: Tom Tromey @ 2007-06-20 16:32 UTC (permalink / raw)
To: help-gnu-emacs
>>>>> "Martin" == Martin <m.gercke@gmail.com> writes:
Martin> I am using emacs to work on a project that needs to be compiled (call
Martin> make) in a specific folder, independent of the current buffer.
I usually use "make -C $DIR" for this.
However, as someone else posted, if you go your route, it is better to
let-bind default-directory.
Martin> How do I make compile to be non-interactive?
Martin> => I want to be able to define a key for "make all" and one for just
Martin> "make.
In Emacs Lisp, interactive commands are also ordinary lisp functions.
You can call compile like: (compile "make all")
Tom
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: compile in specific folder
[not found] ` <mailman.2446.1182351242.32220.help-gnu-emacs@gnu.org>
@ 2007-07-03 9:15 ` Martin
0 siblings, 0 replies; 5+ messages in thread
From: Martin @ 2007-07-03 9:15 UTC (permalink / raw)
To: help-gnu-emacs
> Perhaps an alternate definition will suffice?
>
> (defun my-compile ()
> (interactive)
> (let ((default-directory mypath))
> (call-interactively 'compile)))
Works great ... thanks a lot!
Martin
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2007-07-03 9:15 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-20 9:51 compile in specific folder Martin
2007-06-20 12:59 ` Peter Dyballa
2007-06-20 14:32 ` Denis Bueno
2007-06-20 16:32 ` Tom Tromey
[not found] ` <mailman.2446.1182351242.32220.help-gnu-emacs@gnu.org>
2007-07-03 9:15 ` Martin
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.