Re: auto-delete compile buffer

2003-02-19 Thread Diez B. Roggisch
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



RE: auto-delete compile buffer

2003-02-19 Thread Berndl, Klaus
I created this function:

I think it has to be:

(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

Klaus



Re: auto-delete compile buffer

2003-02-19 Thread Klaus Berndl
On Wed, 19 Feb 2003, Diez B. Roggisch wrote:

  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

I think it has to be:

(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


Klaus
  
  
  However, its not working the way I wanted it to: it kills the buffer,
  but now the frame split persits :(
  
  Any suggestions?
  
  Regards,
  
  Diez

-- 
Klaus Berndlmailto: [EMAIL PROTECTED]
sdm AG http://www.sdm.de
software design  management
Thomas-Dehler-Str. 27, 81737 München, Germany
Tel +49 89 63812-392, Fax -220