Compiling in Xemacs


Compiling in Xemacs

One of the nice features of Xemacs is the ability to compile source code from within it. To compile code from within Xemacs you need to do the following...

Click on the Compile button

From there you will be prompted with a window that shows you what the current command is to compile. By default Xemacs suggests the command "make -k". This may or may not be what you want. If you do not have a makefile (or don't know what one is) then you can change the command to something like "gcc -Wall -ansi *.c" by clicking on "Edit command"


The Compilation Output

This is where I really think that Xemacs is useful. If you have errors gcc (for example) will report file and line numbers that the errors occurred on. Xemacs goes a step further and hyper links that error containing the file and line number so that when you click on it, it will open that file in the current buffer and jump to that line number.

Xemacs will also make sure that you saved all open files, to avoid compiling the sources without compiling them first.


Daniel J. Hood
Last modified: Tue Jan 21 21:32:13 EST 2003