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: Wed, 17 Nov 2010 09:00:36 +0100
User-agent: Thunderbird 2.0.0.21 (Windows/20090302)

>> The variable `even-window-sizes' applies if and only if (1) a window is
>> reused for showing the new buffer, (2) the window and the selected
>> window appear above each other, and (3) both windows are full-width.  (I
>> removed restriction (3) in window-pub.)  `even-window-sizes' doesn't
>> apply when a window is split because the trunk always splits a window
>> into two equally sized halves.
>
> Now I'm confused even more: we're talking about window-pub here, what
> does trunk have to do with it? There's no `even-window-sizes' in trunk
> Emacs.

I meant `even-window-heights'.  I use an even-window-sizes specifier
because it applies to the horizontal case as well.

> Again, I don't understand -- I was complaining about the window-pub
> behaviour, so what will I gain by edebugging the trunk Emacs'
> `split-window-sensibly'?

It would have permitted to deduce in which case the window-pub branch
failed to mimic the behavior of the trunk.

> Well, as I see it the threshold variables were primarily intended to
> provide a simple way for _users_ to customize window splitting, and for
> the simple behaviour I describe (i.e. "only split windows if they're at
> least this wide or that high") I think their semantics is optimal, and I
> still don't see any equivalent in the new system. I guess setting
> `min-height' to (/ split-height-threshold 2) with ".*" as a fallback
> rule in `display-buffer-regexps' and overriding it in more specific
> rules when necessary is as close as it gets?

Yes.

>> Moreover, I now allow to split internal windows like a frame's root
>> window too, so the new window can appear at an arbitrary side of the
>> frame.  In that case, talking about a `split-height-threshold' hardly
>> makes sense.
>
> Um, I don't understand. AIUI you can only split a live window, and the
> only internal window that can be live is the root window as the only
> window on a frame, right? So what does "arbitrary side of the frame"
> mean? When you have a single window, you can split it horizontally or
> vertically, but that's about it. What am I missing?

`split-window' can split an arbitrary window.  My
`display-buffer-regexps', for example, contains the entry

(("ChangeLog.*")
  same-frame
  (reuse-buffer-window)
  (new-window
   (root . below))
  (min-height . 6)
  (min-width . 60)
  (adjust-height . 8))

so I can run ediff in side-by-side windows and edit a ChangeLog within
one and the same frame without disrupting the ediff setup.

Or, you can make sure that your completions always appear in a window on
the right of the frame by adding something like

(("*Completions*")
  same-frame
  (reuse-buffer-window)
  (new-window
   (root . right)))

to `display-buffer-names'.  And, since I'm able to display a buffer on
an arbitrary side of a window I can write

(("*Choices*")
  same-frame
  (reuse-buffer-window)
  (new-window
   (selected . above)))

and have ispell use `display-buffer' for the *Choices* buffer.  This
means that people who want to see the *Choices* buffer on a separate    
frame can do so by simply customizing `display-buffer-names'.

martin



reply via email to

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