Create a new top-level window in GNU Emacs while keeping your current window configuration. For example, pop up an Eclipse-style compilation window.
(add-to-list 'load-path "/path/to/split-root") (require 'split-root) ;; to pop up compilation buffers at the bottom (OPTIONAL) (require 'compile) (defvar compilation-window nil "The window opened for displaying a compilation buffer.") (setq compilation-window-height 14) (defun my-display-buffer (buffer &optional not-this-window) (if (or (compilation-buffer-p buffer) (equal (buffer-name buffer) "*Shell Command Output*")) (unless (and compilation-window (window-live-p compilation-window)) (setq compilation-window (split-root-window compilation-window-height)) (set-window-buffer compilation-window buffer)) (let ((display-buffer-function nil)) (display-buffer buffer not-this-window)))) (setq display-buffer-function 'my-display-buffer) ;; on success, delete compilation window right away! (add-hook 'compilation-finish-functions '(lambda(buf res) (unless (or (eq last-command 'grep) (eq last-command 'grep-find)) (when (equal res "finished\n") (when compilation-window (delete-window compilation-window) (setq compilation-window nil)) (message "compilation successful")))))
If you have any feedback, please email me.
Splitting the root window actually destroys all windows and recreates them. Therefore all windows will be considered dead after splitting.