Emacs Compilation Errors

Over at the Definitely a plug blog there’s a very nice mini-tutorial on using the Emacs compilation facility. When you use 【Meta+xcompile to run a compilation process, Emacs will parse the error output and allow you to step through the errors, jumping to the source of each error as you go. You can go to the next error in the current buffer with 【Ctrl+x `】 and move to the next or previous file with 【Meta+}】 and 【Meta+{】. More conveniently, you can move to the *compilation* buffer and use the buffer-specific navigation keys listed in the post to deal with each error.

Most of this is known to developers who use Emacs regularly but the really interesting part of the post is how to define rules for parsing the results of new (or previously unsupported) compilers. That this is possible should be obvious to any Emacs user but I must admit I didn’t know about it.

The really nice thing about defining new rules is that it’s pretty easy. There’s a simple example in the post that serves as a go-by. This is really interesting and useful material. If you compile things from within Emacs then I really recommend this post—it’s full of good information.

This entry was posted in Programming and tagged . Bookmark the permalink.