emacs-devel
[Top][All Lists]
Advanced

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

Re: moving window handling into lisp


From: martin rudalics
Subject: Re: moving window handling into lisp
Date: Fri, 14 Aug 2009 15:21:22 +0200
User-agent: Thunderbird 2.0.0.21 (Windows/20090302)

> Ok. Could you please then summarize what rules you have thought of
> here? What is it that should be relaxed? What do you want to happen
> then? What problems do you see for different solutions there? (Not the
> algorithms, just the rules, please.)

How can I give you rules if I don't know what kind of rules you expect.
I can only guess, so let's take an example.  Suppose I have two windows
w1 and w2 one above the other:

 ------
| w1   |
|------|
| w2   |
 ------

When I want to enlarge w1 by one line I suppose I can do something
like

(wa-set-wrmin w1 (1+ (window-height w1)))
(wa-set-wrmax w1 (1+ (window-height w1)))
(wa-set-wrmin w2 (1- (window-height w2)))
(wa-set-wrmax w2 (1- (window-height w2)))

that is start with the tightest possible restriction.  Now suppose I
have a third window w3

 ------
| w1   |
|------|
| w2   |
|------|
|      |
| w3   |
|      |
 ------

want to enlarge w1, but w2 has minimum height or is fixed-size (the
latter is an example of a pending bug).  In this case I probably first
try the same as before, fail, and then do

(wa-set-wrmin w1 (1+ (window-height w1)))
(wa-set-wrmax w1 (1+ (window-height w1)))
(wa-set-wrmin w3 (1- (window-height w3)))
(wa-set-wrmax w3 (1- (window-height w3)))

 ------
| w1   |
|------|
| w2   |
|------|
|      |
| w3   |
|      |
 ------

If w3 has two subwindows side-by-side as in

 -------
| w1    |
|-------|
| w2    |
|-------|
|   |   |
| w4|w5 |
|   |   |
 -------

I probably have to do

(wa-set-wrmin w1 (1+ (window-height w1)))
(wa-set-wrmax w1 (1+ (window-height w1)))
(wa-set-wrmin w4 (1- (window-height w4)))
(wa-set-wrmax w4 (1- (window-height w4)))
(wa-set-wrmin w5 (1- (window-height w5)))
(wa-set-wrmax w5 (1- (window-height w5)))

Now is that the way your algorithm is supposed to be used?

[...]
> You may have some very good point that I am totally missing. That will
> show probably show up if we consider some more concrete example and
> rules.

Just tell me whether I got it right in my examples above or whether the
"size applying stuff" is something you want to resolve with the help of
another strategy within

      (case strategy
        ('eq-sizes
           ....

martin




reply via email to

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