[Top][All Lists]

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

Re: moving window handling into lisp

From: Stefan Monnier
Subject: Re: moving window handling into lisp
Date: Mon, 27 Jul 2009 14:18:04 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.94 (gnu/linux)

>> What I mean is that maybe you have more freedom there when you do this
>> internally. Can't you for example calculate the sizes going down the
>> tree before actually applying them to the windows? Can't you this way
>> calculate all the sizes before applying them? You may then of course
>> have to store them node by node by node, but there will be no
>> surprises when you apply them, or?

> I don't know, I would have to code that first.  But I wonder why this
> didn't occur to you and Stefan when you wrote your window balancing
> routines.  You both ended up using `adjust-window-trailing-edge' ;-)

I know why it didn't occur to me:
- I specifically didn't want to use an algorithm like the one that was
  used in the past (when I wrote the code, which started a long time
  ago, before adjust-window-trailing-edge') nor like the one that's
  currently used.  I wanted an algorithm that's more declarative: you
  specify the goal, and the algorithm looks for it without you having to
  tell it how to do it.
- Even if you have the code to compute the desired shape of the tree, it's
  far from trivial to figure out how to go from the current tree shape to
  the goal tree shape without bumping into things like window-min-height
  and window-min-width on intermediate states.
  Actually most of the code in balance-windows-area was written
  specifically for that purpose while trying to fix the original
  balance-windows (which tended to delete windows in some cases for no
  apparent reason).  At some point along the way I figured that I could
  just as well "compute the goal along the way".


reply via email to

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