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, 11 Aug 2009 15:16:09 -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> <4A7010D7.3050305@gmx.at> <4A81374E.9050401@gmx.at> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1250018215 13366 80.91.229.12 (11 Aug 2009 19:16:55 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 11 Aug 2009 19:16:55 +0000 (UTC) Cc: emacs-devel@gnu.org To: martin rudalics Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Aug 11 21:16:48 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 1Mawq0-0000pG-C6 for ged-emacs-devel@m.gmane.org; Tue, 11 Aug 2009 21:16:48 +0200 Original-Received: from localhost ([127.0.0.1]:48294 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mawpy-0003Se-FT for ged-emacs-devel@m.gmane.org; Tue, 11 Aug 2009 15:16:46 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MawpW-0003Hq-Po for emacs-devel@gnu.org; Tue, 11 Aug 2009 15:16:18 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MawpR-0003Fy-NU for emacs-devel@gnu.org; Tue, 11 Aug 2009 15:16:17 -0400 Original-Received: from [199.232.76.173] (port=59348 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MawpR-0003Fu-L3 for emacs-devel@gnu.org; Tue, 11 Aug 2009 15:16:13 -0400 Original-Received: from chene.dit.umontreal.ca ([132.204.246.20]:48235) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MawpR-0007Og-DS for emacs-devel@gnu.org; Tue, 11 Aug 2009 15:16:13 -0400 Original-Received: from faina.iro.umontreal.ca (faina.iro.umontreal.ca [132.204.26.177]) by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id n7BJGAow029707; Tue, 11 Aug 2009 15:16:10 -0400 Original-Received: by faina.iro.umontreal.ca (Postfix, from userid 20848) id F1EEC3A0D5; Tue, 11 Aug 2009 15:16:09 -0400 (EDT) In-Reply-To: <4A81374E.9050401@gmx.at> (martin rudalics's message of "Tue, 11 Aug 2009 11:18:06 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV3338=0 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) 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:114094 Archived-At: >> Another approach is to have a transactional interface, like >> start-window-configuration and end-window-configuration: >> - during the transaction, windows can be resized to too-large/too-small >> sizes (but maybe window-fixed-size should stil be obeyed?). > This would still rely on some predictable behavior of `enlarge-window', > `adjust-window-trailing-edge' and `size_window'. There'd be new low-level functions to resize windows which would work in simple and predictable ways, but with the end-state being potentially invalid. > I suppose we should merge these functions into one Elisp function that > moves the trailing edge of a window and have one C function checking > whether the resulting window tree is well-formed and, if that is the > case, apply the change. As a "high-level" function, I'd imagine a function that looks like (window-resize W N) and returns the amount that it was able to resize (between 0 and N). It would work by calling itself recursively on siblings and/or children. It can't fail and cannot result in an invalid window-tree. Stefan