all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* compile command
@ 2004-11-25 22:00 Rodrigo Canellas
  2004-11-26  9:01 ` Kai Grossjohann
  0 siblings, 1 reply; 5+ messages in thread
From: Rodrigo Canellas @ 2004-11-25 22:00 UTC (permalink / raw)


Hi,


In my '.emacs' I have this:

    (global-set-key [f9] 'compile)

But I would like to 'make' the project when I pressed 'f9'. 

I tried 

    (global-set-key [f9] '(compile make))   

but I got a syntax error.

I also tried (global-set-key [f9] '(compile (make)))  

but I got this message:

    Wrong type argument: commandp, (compile (make)


Does anyone know how it should be done?


Thanks,


Rodrigo Canellas

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

* Re: compile command
       [not found] <mailman.1520.1101420923.27204.help-gnu-emacs@gnu.org>
@ 2004-11-25 23:29 ` Pascal Bourguignon
  2004-11-26  9:31 ` FCC
  1 sibling, 0 replies; 5+ messages in thread
From: Pascal Bourguignon @ 2004-11-25 23:29 UTC (permalink / raw)


Rodrigo Canellas <r.canellas@terra.com.br> writes:

> Hi,
> 
> 
> In my '.emacs' I have this:
> 
>     (global-set-key [f9] 'compile)
> 
> But I would like to 'make' the project when I pressed 'f9'. 
> 
> I tried 
> 
>     (global-set-key [f9] '(compile make))   
> 
> but I got a syntax error.
> 
> I also tried (global-set-key [f9] '(compile (make)))  
> 
> but I got this message:
> 
>     Wrong type argument: commandp, (compile (make)
> 
> 
> Does anyone know how it should be done?

Yes, you should pay attention to the error messages!  If they're too
fugacious in the Mini-Buffer, you can see them in the *Message* buffer.

compile: Wrong type argument: char-or-string-p, make
-------- -------------------- ----------------  ----
who says What's wrong         What's expected   What you gave.

-- 
__Pascal Bourguignon__                     http://www.informatimago.com/
The world will now reboot; don't bother saving your artefacts.

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

* Re: compile command
  2004-11-25 22:00 compile command Rodrigo Canellas
@ 2004-11-26  9:01 ` Kai Grossjohann
  2004-11-26  9:13   ` Rodrigo Canellas
  0 siblings, 1 reply; 5+ messages in thread
From: Kai Grossjohann @ 2004-11-26  9:01 UTC (permalink / raw)


Rodrigo Canellas <r.canellas@terra.com.br> writes:

> In my '.emacs' I have this:
>
>     (global-set-key [f9] 'compile)
>
> But I would like to 'make' the project when I pressed 'f9'. 
>
> I tried 
>
>     (global-set-key [f9] '(compile make))   

You can set the variable compile-command to "make" and then invoke
recompile instead of compile.

Does that help?

Kai

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

* Re: compile command
  2004-11-26  9:01 ` Kai Grossjohann
@ 2004-11-26  9:13   ` Rodrigo Canellas
  0 siblings, 0 replies; 5+ messages in thread
From: Rodrigo Canellas @ 2004-11-26  9:13 UTC (permalink / raw)


I'll try and then let you know.

Thanks

Em Sexta 26 Novembro 2004 07:01, Kai Grossjohann escreveu:
> Rodrigo Canellas <r.canellas@terra.com.br> writes:
> > In my '.emacs' I have this:
> >
> >     (global-set-key [f9] 'compile)
> >
> > But I would like to 'make' the project when I pressed 'f9'.
> >
> > I tried
> >
> >     (global-set-key [f9] '(compile make))
>
> You can set the variable compile-command to "make" and then invoke
> recompile instead of compile.
>
> Does that help?
>
> Kai
>
>
>
> _______________________________________________
> Help-gnu-emacs mailing list
> Help-gnu-emacs@gnu.org
> http://lists.gnu.org/mailman/listinfo/help-gnu-emacs
>
> Esta mensagem foi verificada pelo E-mail Protegido Terra.
> Scan engine: McAfee VirusScan / Atualizado em 24/11/2004 / Versão: 4.3.20
> (10.21) - Dat 4410 Proteja o seu e-mail Terra:
> http://www.emailprotegido.terra.com.br/

-- 
Rodrigo Canellas
Engenheiro de Sistemas de Informação

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

* Re: compile command
       [not found] <mailman.1520.1101420923.27204.help-gnu-emacs@gnu.org>
  2004-11-25 23:29 ` Pascal Bourguignon
@ 2004-11-26  9:31 ` FCC
  1 sibling, 0 replies; 5+ messages in thread
From: FCC @ 2004-11-26  9:31 UTC (permalink / raw)


Rodrigo Canellas articulated on 11/25/2004 11:00 PM:

>Hi,
>
>
>In my '.emacs' I have this:
>
>    (global-set-key [f9] 'compile)
>
>But I would like to 'make' the project when I pressed 'f9'. 
>
>I tried 
>
>    (global-set-key [f9] '(compile make))   
>
>but I got a syntax error.
>
>I also tried (global-set-key [f9] '(compile (make)))  
>
>but I got this message:
>
>    Wrong type argument: commandp, (compile (make)
>
>
>Does anyone know how it should be done?
>
>
>Thanks,
>
>
>Rodrigo Canellas
>
>
>  
>
You need to write something like
(defun run-make()
"Runs make skipping the intermediate `compile' step."
(interactive)
(shell-command "/directory/to/make/executable/make -f
/directory/to/makefile/Makefile1" "*run-make*" "*run-make-errors"))
And then bind this function to f9 by
(global-set-key [f9] 'run-make)

Others may have better suggestions.

-- 
FCC.

===
You will not understand the power and beauty of your youth until they've
faded.
-Lee Perry and Quindon Tarver.

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

end of thread, other threads:[~2004-11-26  9:31 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-11-25 22:00 compile command Rodrigo Canellas
2004-11-26  9:01 ` Kai Grossjohann
2004-11-26  9:13   ` Rodrigo Canellas
     [not found] <mailman.1520.1101420923.27204.help-gnu-emacs@gnu.org>
2004-11-25 23:29 ` Pascal Bourguignon
2004-11-26  9:31 ` FCC

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.