help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: compile perl file, specify current buffer, using help effectively


From: Burton Samograd
Subject: Re: compile perl file, specify current buffer, using help effectively
Date: Tue, 02 May 2006 23:26:17 -0600
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.51 (gnu/linux)

"David Schneider" <goedelsch@gmail.com> writes:

> I am trying to use emacs as an IDE for perl development.  I think it
> would be useful to have a compile command that runs perl on the
> current buffer I am editing.  The compile command defaults to make -k.
> I want to change it to perl xx where xx is the name of the current
> buffer - is there some variable or special syntax I can use to get the
> current filename?

In your ~/.emacs you can put:

(setq compile-command "perl xx")

or you can just change the command name when it asks and then it will
use whatever you set it to for subsiquent compiles.

A handy binding in your .emacs is:

(global-set-key "\C-cc" 'compile)

Which calls compile when you hit Control c and then c.
  
> More important then the answer, is how do I figure
> this out from the help.  I have been using C-h a to try to search the
> help.  This gives me lists of commands or variables which may be
> related - but I frequently find my questions are still unanswered.

That is just something that takes time to learn.  Emacs is big and
takes a *long* time to master.  Asking questions (like you are doing)
is one of the best ways to get quick answers.  You can then learn more
by taking the answer and exploring emacs more.  Try looking at the
compile-command variable documentation using C-h v
(describe-variable). Another useful one is C-h f (describe-function),
which you can use to describe the compile function (where you can find
out about the compile-command variable, 5th paragraph).

-- 
burton samograd                                 kruhft .at. gmail
kruhft.blogspot.com     www.myspace.com/kruhft  metashell.blogspot.com


reply via email to

[Prev in Thread] Current Thread [Next in Thread]