10
votes

I would like to have a pop-up bottom window for temporary buffers like compilation, Completions, etc. It should split-vertically the whole frame even if root window was split horizontally. For example: Before M-x compile:

+------+------+
|      |      |
|      |      |
|      |      |
+------+------+

After:

+------+------+
|      |      |
+------+------+
|             |
+------+------+

I'm absolutely satisfied with ecb-compilation-window, but I don't want to use ECB and CEDET. Actually I see two ways make described behavior but both have their drawbacks.

Drawback: it uses delete-other-windows function and then rebuilds previous windows tree after root window is split as required. It invalidates all references to existed earlier windows in your code(or code of any module).

  • Set window-min-height variable to its minimal possible value(1) and call split-window-vertically during emacs startup minimizing window height after it's created. Then use this window for temporary buffers setting its height as required.

Drawbacks: Small annoying window with annoying modeline on the bottom of the frame, doesn't work with emacs --daemon.

Are there more elegant ways to do that without drawbacks?

1

1 Answers

13
votes

Use popwin !

It behaves as you describe out of the box, and configuration is easy, it only took one line to get my anything buffers to pop-up at the bottom of the screen :

(push '("\*anything*" :regexp t :height 20) popwin:special-display-config)

There some more detailed config examples floating around japanese blogs, just google it.