Archive for the ‘Emacs’ Category
First Attempt
I took, my first stab at my own emacs-lisp function. The purpose being
to make the *compilation* buffer disapear if there is no error. Initial
plans had a few more things I wanted, however they would have resulted
in a very inflexable function, which appears to be the very opposite of emacs.
My first attempt
(defun wramp-build (input) ;; how about filename
;;interactive?
if ((compile ./build.sh input)
(switch-to-buffer(remote))))
However a kind user bpalmer on #emacs pointed out that compile is an
asynchronous
process, which is a good thing, a different approach was neccesery. In
case anyones curious remote is program based on minicom used for serial
communication with computer designed and build at the Waikato University
for teaching assembly on, wramp is the name of said computer. The
following was supplied by bpalmer from the emacs-wiki
(setq compilation-finish-functions 'compile-autoclose) (defun compile-autoclose (buffer string) (cond ((string-match "finished" string) (bury-buffer "*compilation*") (winner-undo) (message "Build successful.")) (t (message "Compilation exited abnormally: %s" string))))
While I know I wouldnt have written that myself Im pretty sure I
understand what it does. All I know is I cant wait till exams finnish
as I will have time to start learning more emacs lisp.
Comments (6)