To prevent confusion, I only run one "window" of emacs and so I use window in the emacs sense. I'm looking to get a window split which, let's say 70 in width, contains the completions buffer on the new split when I start emacs. I think I need to have a dedicated window. What I'm basicly trying to achieve is the following.

 |     | A |
 |     |---|
 |  C  | B |

C = where I normally work. A = the completion buffer (also I would like to have messages and everything that emacs throws at me there) B = a shell.

I have now the following added for this purpose in my .emacs:

(split-window-horizontally)   ;; want two windows at startup 
(other-window 1)              ;; move to other window
(shell)                       ;; start a shell
(other-window 1)              ;; move back to first window 

I would like to split the right window another time vertically and I would like to be able to specify the dimensions of each window. Also, I would like to have the dedicated property of the completions, messages, ... window (A) to be true so that emacs doesn't replace it.

I've heard that a lot of people use this setup but I can't seem to find it anywhere.

  • one on one has dedicated completion windows and stuff
    – Tom
    Jun 17, 2012 at 5:14
  • @Tom, I was talking in the emacs sense of a window and I'm searching for a way to ge windows not frames Jun 17, 2012 at 8:26

1 Answer 1


Eventually I was able to get what I wanted with the following in my .emacs file.

  (other-window 1)
  (other-window 1)
  (other-window 1)) ;; finally change back to scratch window

;; open temporary buffers in a dedicated window split
(setq special-display-regexps
          "^\\*elisp macroexpansion\\*$"
          "^\\*local variables\\*$"
          "^\\*Quail Completions\\*$"
          "^\\*SLIME Description\\*$"
          "^\\*.* output\\*$" ; tex compilation buffer
          "^\\*TeX Help\\*$"
          "^\\*Shell Command Output\\*$"
          "^\\*Async Shell Command\\*$"
(setq grb-temporary-window (nth 1 (window-list)))
(defun grb-special-display (buffer &optional data)
  (let ((window grb-temporary-window))
    (with-selected-window window
      (switch-to-buffer buffer)
(setq special-display-function #'grb-special-display)

I found what I needed in this .emacs file on github.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.