Next: , Up: Shell Commands   [Index]


9.5.1 Compiling in Emacs

‘M-x compile’ asynchronously runs a compilation command (by default make -k). You can run any command or script, however, and track the output. Error messages go to the "compilation" buffer.

CommandsDescription
‘M-x compile’Runs a command, and tracks errors
‘M-x recompile’Re-runs last command
‘M-g M-n’, ‘M-g M-p’Jumps to next or previous error
‘C-x `’Visit errors sequentially
‘g’ (Compilation mode)Re-runs last command
‘M-x kill-compilation’Kill the running compilation subprocess
‘compile-command’Variable holding prior command
‘compilation-scroll-output’Variable controlling scrolling of compilation buffer
‘compilation-environment’Variable to control the environment passed

Table 9.2: Compilation command key bindings