2
GNU emacs 23.2.1

I am using emacs on a netbook 10" screen size.

If I have 2 buffers open vertically to each other. When I compile the compilation show up in a new vertical buffer. However, now I have 3 buffers. However, with a small screen there is no room to see the errors.

I am wondering if there is a way to show the compilation in the inactive buffer.

I am using the following to display the vertical buffer:

; Always split vertiacally 
(setq split-width-threshold 0)
(setq split-height-threshold nil)

Many thanks for any suggestions,

1
  • When I compile is creates a *compilation* buffer that displays on the inactive side. Does that not work for you, or do you not want to create the *compilation* buffer?
    – snakehiss
    Commented Nov 23, 2010 at 20:35

1 Answer 1

4

Try

(setq split-width-threshold (ceiling (frame-width) 2))

Edit (Nov 24):

Maybe this will do:

(defun display-on-side (buffer &optional not-this-window frame)
  (let* ((window (or (minibuffer-selected-window)
                     (selected-window)))
         (display-buffer-function nil)
         (pop-up-windows nil))
    (with-selected-window (or window (error "display-on-side"))
      (when (one-window-p t)
        (split-window-horizontally))
      (display-buffer buffer not-this-window frame))))

(setq display-buffer-function 'display-on-side)
4
  • Sorry, that didn't work. It still opened up a new buffer. Currently if I have 2 buffer side by side (buffer1, buffer2). If buffer1 has focus when I compile. Then I want buffer2 (inactive buffer) to display the compilation results. Thanks.
    – ant2009
    Commented Nov 16, 2010 at 16:59
  • It works for me with a naked emacs (i.e., emacs -Q). Perhaps it's other part of your .emacs file that causes the problem? For example, does it set pop-up-windows to non-nil?
    – huaiyuan
    Commented Nov 16, 2010 at 17:55
  • I don't have any thing like a pop-up-windows. What I have been experimenting with is this: ; Always split vertiacally (setq split-width-threshold (ceiling (frame-width) 2)) ;(setq split-width-threshold 0) ;(setq split-height-threshold nil) Thanks for your help
    – ant2009
    Commented Nov 23, 2010 at 14:55
  • This works beautifully for the compilation problem. But my problem now is that all new opens open in the "next frame", e.g. in Dired mode it'll open the next subdir in the other frame and continue flip-flopping between the frames. And simply opening a file when in one frame opens it in the other! (yeah I know, holy thread re-awakening), is there a simple fix, or should I start a new question? Commented May 20 at 12:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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