Skip to content

Instantly share code, notes, and snippets.

@juliomenendez
Created January 13, 2012 19:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save juliomenendez/1608297 to your computer and use it in GitHub Desktop.
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.
(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