[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: Tue, 28 Jul 2009 09:47:23 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.94 (gnu/linux)

>> - 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.
> As it stands, your algorithm depends on `adjust-window-trailing-edge'
> DTRT though.

Actually, it works better if adjust-window-trailing-edge DTRT, but it
should still work OK if adjust-window-trailing-edge doesn't quite do the
right thing (e.g. if it resizes by less then requested).

>> - 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.
> And fixed-size windows.  It's a pain.  Some combinations of desired
> window configuration / frame sizes do not even have a solution at all

I'm talking about something else: after having a found a solution
(i.e. you know exactly the size you want for of each window and it is
correct for the size of the frame), find a set of calls to
enlarge/shrink-window (or equivalent) that will bring you from the
current window configuration to the desired window configuration.

But yes, "finding a solution" is itself a difficult problem.


reply via email to

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