[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: window-size constraints
From: |
Stefan Monnier |
Subject: |
Re: window-size constraints |
Date: |
Sat, 14 Jun 2008 22:01:08 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) |
>> I think we should go in the direction of "constraints", which would take
>> the form of Elisp functions. Every configuration change would
>> correspond to adding&removing constraints, and then try and solve the
>> resulting CSP. Constraints would come with priorities so that in the
>> case the CSP has no solution, we can choose which constraint(s)
>> to break, or alternatively, the satisfaction of a constraint would not be
>> boolean, so the goal would be to try and maximize the satisfaction.
> We'd still have to decide whether and how to honor buffer-local values
> of variables like `window-min-height'
Of course, we have to honor it. It's already defined as buffer-local.
It should be easy/trivial to support. At least window-area-factor was
trivial and I see no reason why window-min-height should be any
more difficult.
> or `split-height-threshold'.
I'm not sure I'd want to include display-buffer in this system, tho
I guess it might make sense.
> When the window configuration changes Emacs often tries to preserve
> proportionally the size of non-fixed size windows as faithfully as
> possible. How would `balance-windows-area' help here?
I'm not referring to the functionality it provides, but to the way it
does it, i.e. to its code. But it's really not that important: just let
the C code do its thing, hoping it won't mess up majorly (i.e. it won't
delete windows that don't absolutely need to be deleted), and then do
the actual size-choice in Elisp by trying to resolve the CSP.
> Doesn't it try to give all windows the same size?
Yes, except for the window-area-factor detail, but again, this
isn't relevant, really.
Stefan