bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#11960: Defective layout change on M-x ediff-buffers


From: martin rudalics
Subject: bug#11960: Defective layout change on M-x ediff-buffers
Date: Fri, 05 Oct 2012 18:14:15 +0200

> 1) start emacs via emacs -Q
> 2) open a buffer A
> 3) use C-x 3 to open another buffer (buffer B) next to A (side-by-side)
> 4) use M-x ediff-buffers to compare A and B.
>
> Instead of leaving the buffers arranged side-by-side (as obtained from
> C-x 3), the buffers are displayed vertically (on top of each other) when
> using 4). However, I would expect emacs to open them side-by-side as
> well .

Your expectation sounds intuitive.  But the behavior of ediff is
governed by the value of `ediff-split-window-function' and it would be
wrong to override that.  Moreover, at the time ediff applies that
function, the original frame layout has been already destroyed.

So you can either try to use something like the sloppy

(add-hook 'ediff-before-setup-hook 'my-check-configuration)

(defun my-check-configuration ()
  (setq ediff-split-window-function
        (if (window-combination-p (frame-root-window))
            'split-window-below
          'split-window-right)))

or permanently set `ediff-split-window-function' to `split-window-right'.

martin





reply via email to

[Prev in Thread] Current Thread [Next in Thread]