From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.devel Subject: Re: moving window handling into lisp Date: Tue, 28 Jul 2009 09:38:42 +0200 Message-ID: <4A6EAB02.6080701@gmx.at> References: <4A6DAD94.8040006@gmx.at> <4A6DAF71.6070002@gmx.at> <4A6DBB3A.90001@gmx.at> <4A6DC1A1.2000208@gmx.at> <4A6DDB61.8090403@gmx.at> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1248770366 20277 80.91.229.12 (28 Jul 2009 08:39:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 28 Jul 2009 08:39:26 +0000 (UTC) Cc: emacs-devel@gnu.org, Lennart Borgman , Miles Bader To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jul 28 10:39:18 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MViDC-0001iB-7o for ged-emacs-devel@m.gmane.org; Tue, 28 Jul 2009 10:39:06 +0200 Original-Received: from localhost ([127.0.0.1]:57147 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MViDB-00031g-Ao for ged-emacs-devel@m.gmane.org; Tue, 28 Jul 2009 04:39:05 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MViD1-00031Q-7L for emacs-devel@gnu.org; Tue, 28 Jul 2009 04:38:55 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MViCv-000304-8e for emacs-devel@gnu.org; Tue, 28 Jul 2009 04:38:53 -0400 Original-Received: from [199.232.76.173] (port=58970 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MViCv-0002zx-2f for emacs-devel@gnu.org; Tue, 28 Jul 2009 04:38:49 -0400 Original-Received: from mail.gmx.net ([213.165.64.20]:41282) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1MViCu-0002k8-AA for emacs-devel@gnu.org; Tue, 28 Jul 2009 04:38:48 -0400 Original-Received: (qmail invoked by alias); 28 Jul 2009 07:38:45 -0000 Original-Received: from 62-47-41-104.adsl.highway.telekom.at (EHLO [62.47.41.104]) [62.47.41.104] by mail.gmx.net (mp025) with SMTP; 28 Jul 2009 09:38:45 +0200 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX19LLoVBaL5LjkEYPEedMtWGLXTNw6UwV/mawK06iq Jk/8GdctUFsnil User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) In-Reply-To: X-Y-GMX-Trusted: 0 X-FuHaFi: 0.71 X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:113277 Archived-At: > - 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. > - 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 (just like putting footnotes on pages): You can't put a cretain window into a frame because it won't fit due to some restrictions; so you decide to delete it. But if you delete it, the remaining windows won't fit, so you put it back. > 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". martin