Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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.

share|improve this question
    
one on one has dedicated completion windows and stuff –  Tom Jun 17 '12 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 –  Silverrocker Jun 17 '12 at 8:26

1 Answer 1

up vote 1 down vote accepted

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

(progn
  (interactive)
  (split-window-horizontally)
  (other-window 1)
  (split-window)
  (other-window 1)
  (eshell)
  (other-window 1)) ;; finally change back to scratch window



;; open temporary buffers in a dedicated window split
(setq special-display-regexps
        '("^\\*Completions\\*$"
          "^\\*Help\\*$"
          "^\\*grep\\*$"
          "^\\*Apropos\\*$"
          "^\\*elisp macroexpansion\\*$"
          "^\\*local variables\\*$"
          "^\\*Compile-Log\\*$"
          "^\\*Quail Completions\\*$"
          "^\\*Occur\\*$"
          "^\\*frequencies\\*$"
          "^\\*compilation\\*$"
          "^\\*Locate\\*$"
          "^\\*Colors\\*$"
          "^\\*tumme-display-image\\*$"
          "^\\*SLIME Description\\*$"
          "^\\*.* output\\*$" ; tex compilation buffer
          "^\\*TeX Help\\*$"
          "^\\*Shell Command Output\\*$"
          "^\\*Async Shell Command\\*$"
          "^\\*Backtrace\\*$"))
(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)
      window)))
(setq special-display-function #'grb-special-display)

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

https://github.com/garybernhardt/dotfiles/blob/master/.emacs

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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