emacs-devel
[Top][All Lists]
Advanced

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

Re: The window-pub branch


From: martin rudalics
Subject: Re: The window-pub branch
Date: Sun, 05 Dec 2010 12:44:48 +0100
User-agent: Thunderbird 2.0.0.21 (Windows/20090302)

> I found out that hooking ediff to use just 'display-buffer is
> actually easy via 'ediff-window-setup-function'.

For some value of easy ;-)

> 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'.

What does EWM different from the standard setup of ediff?  I suppose
you'd use the primary and secondary edit window for the A and B buffer
and a third one (the compile window maybe) for the H buffer.  Is your
primary aim to keep things like the sidebar and top windows alive - that
is to "embed" the ediff windows in the rest of your frame components?

> The wrapper calls two functions that you'd

Who is "you"?

> need to have:
>
>     my-display-multi-buffers (list-of-buffers-and-labels)
>     ;; display some buffers and return list of their windows

I'm currently using the third argument of `display-buffer' as label (I
call it TAG so far).  For `pop-to-buffer' it's the fourth.

>     my-select-window (window)
>     ;; select 'window' and frame where it's on:

In what sense is this different from `select-window'?  In some ediff
sense (I didn't look into their code)?

> (setq ediff-window-setup-function
[...]
>                (my-display-multi-buffers
>                 `((,A . ediff-A)
>                   (,B . ediff-B)
>                   (,C . ediff-C)
>                   (,H . ediff-H)

The great problem I see here is that setting up a window for C might
depend on _where_ A and B have been displayed before.  Suppose you want
to write a `display-buffer-function' for ediff-C: How would you know
where A and B are displayed?  If you can put all in one function (like
`ediff-setup-windows-multiframe-merge') things are fairly simple.  But
with separate display functions things get messy.  Or do you mean that
`my-display-multi-buffers' itself should track such window dependencies?

martin



reply via email to

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