[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: The window-pub branch
From: |
grischka |
Subject: |
Re: The window-pub branch |
Date: |
Sat, 04 Dec 2010 19:10:58 +0100 |
User-agent: |
Thunderbird 2.0.0.23 (Windows/20090812) |
I found out that hooking ediff to use just 'display-buffer is
actually easy via 'ediff-window-setup-function'.
Here is some code if you want to test your future version of
'display-buffer'. It works quite well with a slightly improved
version of EWM for 'ediff-files'.
The wrapper calls two functions that you'd need to have:
my-display-multi-buffers (list-of-buffers-and-labels)
;; display some buffers and return list of their windows
my-select-window (window)
;; select 'window' and frame where it's on:
The stuff in the apply form is from ediff-setup-windows-plain-compare.
Don't ask me what it does.
(setq ediff-window-setup-function
(lambda (A B C H) ;; buffers
(apply (lambda (WA WB WC WH) ;; windows
(ediff-with-current-buffer control-buffer
(setq ediff-window-A WA
ediff-window-B WB
ediff-window-C WC
)
(when ediff-windows-job
(set-window-start WA
(ediff-overlay-start
(ediff-get-value-according-to-buffer-type
'A ediff-narrow-bounds)))
(set-window-start WB
(ediff-overlay-start
(ediff-get-value-according-to-buffer-type
'B ediff-narrow-bounds)))
))
(my-select-window WH)
(ediff-setup-control-buffer control-buffer)
)
(my-display-multi-buffers
`((,A . ediff-A)
(,B . ediff-B)
(,C . ediff-C)
(,H . ediff-H)
))
)))
- Re: The window-pub branch,
grischka <=
- Re: The window-pub branch, martin rudalics, 2010/12/05
- Re: The window-pub branch, grischka, 2010/12/05
- Re: The window-pub branch, martin rudalics, 2010/12/06
- Re: The window-pub branch, grischka, 2010/12/06
- Re: The window-pub branch, martin rudalics, 2010/12/06
- Re: The window-pub branch, grischka, 2010/12/06
- RE: The window-pub branch, Drew Adams, 2010/12/06
- Re: The window-pub branch, grischka, 2010/12/07
- Re: The window-pub branch, grischka, 2010/12/07
- Re: The window-pub branch, martin rudalics, 2010/12/07