Nifty Emacs project of the day: tdd.el https://github.com/jorgenschaefer/emacs-tdd/ lets you run a compilation command on every save.