Created
January 13, 2012 19:36
-
-
Save juliomenendez/1608297 to your computer and use it in GitHub Desktop.
Emacs lisp code to get a Growl notification when a compilation is done.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun growl (title message) | |
(start-process "growl" " growl" "growlnotify" title "-a" "Emacs") | |
(process-send-string " growl" message) | |
(process-send-string " growl" "\n") | |
(process-send-eof " growl")) | |
(defun growl-compilation-result(buffer msg) | |
(if (string-match "^finished" msg) | |
(progn | |
(growl "Emacs compilation" "Compilation Successful :-)")) | |
(growl "Emacs compilation" "Compilation Failed :-("))) | |
(add-to-list 'compilation-finish-functions 'growl-compilation-result) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment