Error: Can't use winner-mode functions in the ecb-frame

Sebastien VARRETTE <[email protected]> Thu, 14 Jan 2010 16:38:11 +0100
Newsgroups gmane.emacs.code-browser
Message-ID <[email protected]>
Hi all, 

I've been very happy with the peace of code I got from http://www.emacswiki.org/emacs/ModeCompile to automatically close the compilation buffer on success using winner-mode: 

;; remove the compilation buffer if there was no error
;; see http://www.emacswiki.org/emacs/ModeCompile
(defun compile-autoclose (buffer string)
  "Switch back to whatever buffer was in your other window 
   if compilation is successful."
  (cond ((string-match "finished" string)
         (bury-buffer "*compilation*")
         (winner-undo)
         (message "Build successful."))
        (t                                                                    
         (message "Compilation exited abnormally: %s" string))))

;; Switch back to whatever buffer was in your other window if compilation is
;; successful
;; see http://www.emacswiki.org/emacs/ModeCompile
;; Close the compilation window if there was no error at all.
;; version that use the winner mode (see ~/.emacs.d/init-defuns.el)
(setq compilation-finish-functions 'compile-autoclose)

I just notice it doesn't work with ECB (see http://ecb.sourceforge.net/docs/Conflicts.html):

12.1.1.14 Package winner.el (winner-mode)

winner-mode is autom. disabled as long as ECB is running. ECB has its own window-management which is completely incompatible with winner-mode! But winner-mode makes also not really sense with ECB.


I would like to maintain this feature when ECB is activated and keep a winner version when I'm not using it. It comes with two questions: 
- what are the equivalent functions in ECB of winner-undo ? 
- how can I modify the compile-autoclose function to use one or the other more (I guess there will be a featurep somewhere but I'm really an elisp newb 

In all case, thanks by advance for your help. 

Best regards, 


------------------------------------------------------------------------------
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev