Hi,

Javier S. Lopez wrote:
The method jde-compile-finish-kill-buffer takes care of removing the
compilation window from the screen.
if you add this lines:

(run-at-time
"3 sec" nil 'kill-buffer
(get-buffer-create "*compilation*"))

to your jde-compile-finish-kill-buffer method after the lines:
(get-buffer-create "*compilation*)
I created this function:


(defun jde-compile-finish-kill-buffer (buf msg)
"Removes the jde-compile window after a few seconds if no errors."
(save-excursion
(set-buffer buf)
(if (null (or (string-match ".*exited abnormally.*" msg)
(string-match ".*BUILD FAILED.*" (buffer-string))))
;;no errors, make the compilation window go away in a few seconds
(progn
(run-at-time
"2 sec" nil 'delete-windows-on
(get-buffer-create "*compilation*")
(run-at-time
"2 sec" nil 'kill-buffer
(get-buffer-create "*compilation*")))
(message "No compilation errors"))
;;there were errors, so jump to the first error
(next-error))))


However, its not working the way I wanted it to: it kills the buffer, but now the frame split persits :(

Any suggestions?

Regards,

Diez



Reply via email to