Re: Questions From A New User
>>>>> "John" == John J Boyer <director@chpi.org> writes:
John> Hello, I'm a long-time programmor, but a new emacs user. My
John> fi1rst two questions are: how do I run she compiler from inside
John> emacs? And, when I get an error message from the compiler, how
John> do I go to the line it says the error is on? I'm using emacs
John> under Redhat 7.1. Thanks. John
M-x compile will offer to run 'make' for you in the directory of the
current buffer. you can change the command by either editing the
command in the minibuffer, or you can add something like this:
(add-hook 'java-mode-hook
(function
(lambda ()
; make forward and backward word work with bicap
(define-key jde-mode-map
'(control right) 'c-forward-into-nomenclature)
(define-key jde-mode-map
'(control left) 'c-backward-into-nomenclature)
(make-local-variable 'compile-command)
(setq
compile-command "ant -emacs -find build.xml"
c-basic-offset 2
tab-width 2
indent-tabs-mode nil))))
into your .emacs file, which (among other things) sets the compile
command for Java files to run ant. you could set up a similar
function for C mode, if that was your thing.
after the compile runs, there will be a buffer containing errors and
warnings from the compiler. emacs understands GCC, and other
compilers often have switches to produce output in emacs-understable
formats. the ant command above contains such a switch.
--
joe
Reply to: