From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: moving window handling into lisp Date: Tue, 28 Jul 2009 09:47:23 -0400 Message-ID: References: <4A6DAD94.8040006@gmx.at> <4A6DAF71.6070002@gmx.at> <4A6DBB3A.90001@gmx.at> <4A6DC1A1.2000208@gmx.at> <4A6DDB61.8090403@gmx.at> <4A6EAB02.6080701@gmx.at> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1248788898 16018 80.91.229.12 (28 Jul 2009 13:48:18 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 28 Jul 2009 13:48:18 +0000 (UTC) Cc: emacs-devel@gnu.org, Lennart Borgman , Miles Bader To: martin rudalics Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jul 28 15:48:11 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 1MVn1x-0003AG-Jb for ged-emacs-devel@m.gmane.org; Tue, 28 Jul 2009 15:47:49 +0200 Original-Received: from localhost ([127.0.0.1]:55359 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MVn1x-0000gA-0T for ged-emacs-devel@m.gmane.org; Tue, 28 Jul 2009 09:47:49 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MVn1f-0000Uj-25 for emacs-devel@gnu.org; Tue, 28 Jul 2009 09:47:31 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MVn1e-0000TO-3p for emacs-devel@gnu.org; Tue, 28 Jul 2009 09:47:30 -0400 Original-Received: from [199.232.76.173] (port=54685 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MVn1d-0000T1-Sh for emacs-devel@gnu.org; Tue, 28 Jul 2009 09:47:29 -0400 Original-Received: from ironport2-out.pppoe.ca ([206.248.154.182]:40260 helo=ironport2-out.teksavvy.com) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MVn1Z-0001hq-Ee; Tue, 28 Jul 2009 09:47:25 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AqEEAPydbkrO+LXs/2dsb2JhbACBUdI+hAwFhxU X-IronPort-AV: E=Sophos;i="4.43,283,1246852800"; d="scan'208";a="42388413" Original-Received: from 206-248-181-236.dsl.teksavvy.com (HELO ceviche.home) ([206.248.181.236]) by ironport2-out.teksavvy.com with ESMTP; 28 Jul 2009 09:47:23 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id 549307004E; Tue, 28 Jul 2009 09:47:23 -0400 (EDT) In-Reply-To: <4A6EAB02.6080701@gmx.at> (martin rudalics's message of "Tue, 28 Jul 2009 09:38:42 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.94 (gnu/linux) 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:113286 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. 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. Stefan