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

Re: Questions From A New User



>>>>> On 15 Jan 2002 07:41:31 -1000, Joseph Dane <jdane@lava.net> said:

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

 Joseph> M-x compile will offer to run 'make' for you in the directory

M-x compile is often tied to the key sequence C-c C-c

 Joseph> of the current buffer.  you can change the command by either
 Joseph> editing the command in the minibuffer, or you can add
 Joseph> something like this:

 Joseph> (add-hook 'java-mode-hook
 Joseph> 	  (function
 Joseph> 	   (lambda ()
 Joseph> ; make forward and backward word work with bicap
 Joseph> 	     (define-key jde-mode-map
 Joseph> 	       '(control right) 'c-forward-into-nomenclature)
 Joseph> 	     (define-key jde-mode-map
 Joseph> 	       '(control left) 'c-backward-into-nomenclature)
 Joseph> 	     (make-local-variable 'compile-command) (setq
 Joseph> 	      compile-command "ant -emacs -find build.xml"
 Joseph> 	      c-basic-offset 2 tab-width 2 indent-tabs-mode
 Joseph> 	      nil))))

 Joseph> into your .emacs file, which (among other things) sets the
 Joseph> compile command for Java files to run ant.  you could set up
 Joseph> a similar function for C mode, if that was your thing.

 Joseph> after the compile runs, there will be a buffer containing
 Joseph> errors and warnings from the compiler.  emacs understands
 Joseph> GCC, and other compilers often have switches to produce
 Joseph> output in emacs-understable formats.  the ant command above
 Joseph> contains such a switch.

This is often tied to the key sequence C-x ~

You should probably be asking these questions on a redhat specific
list or an emacs specific list.  Typically this list is used for
discussing (x)emacs issues on a debian system (not redhat).

Jim

-- 
@James LewisMoss <dres@debian.org>      |  Blessed Be!
@    http://jimdres.home.mindspring.com |  Linux is kewl!
@"Argue for your limitations and sure enough, they're yours." Bach



Reply to: