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: Fri, 14 Aug 2009 15:21:22 +0200 Message-ID: <4A8564D2.3060702@gmx.at> References: <4A841B8B.8040107@gmx.at> <4A84567E.4080602@gmx.at> <4A850FBE.7030402@gmx.at> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1250256111 31797 80.91.229.12 (14 Aug 2009 13:21:51 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 14 Aug 2009 13:21:51 +0000 (UTC) Cc: Stefan Monnier , emacs-devel@gnu.org To: Lennart Borgman Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Aug 14 15:21:43 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 1Mbwiz-00081x-OC for ged-emacs-devel@m.gmane.org; Fri, 14 Aug 2009 15:21:42 +0200 Original-Received: from localhost ([127.0.0.1]:49381 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mbwiy-0005fW-NC for ged-emacs-devel@m.gmane.org; Fri, 14 Aug 2009 09:21:40 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mbwis-0005dr-Lj for emacs-devel@gnu.org; Fri, 14 Aug 2009 09:21:34 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Mbwin-0005Wl-8o for emacs-devel@gnu.org; Fri, 14 Aug 2009 09:21:33 -0400 Original-Received: from [199.232.76.173] (port=52985 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mbwin-0005WV-3I for emacs-devel@gnu.org; Fri, 14 Aug 2009 09:21:29 -0400 Original-Received: from mail.gmx.net ([213.165.64.20]:56351) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1Mbwim-00053e-HR for emacs-devel@gnu.org; Fri, 14 Aug 2009 09:21:28 -0400 Original-Received: (qmail invoked by alias); 14 Aug 2009 13:21:25 -0000 Original-Received: from 62-47-32-250.adsl.highway.telekom.at (EHLO [62.47.32.250]) [62.47.32.250] by mail.gmx.net (mp010) with SMTP; 14 Aug 2009 15:21:25 +0200 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX19hETAUeN5hCT0KmWCNfqOs5VV6Bi+YAMnD1VU7OR h+sOEpUpWw2Lud User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) In-Reply-To: X-Y-GMX-Trusted: 0 X-FuHaFi: 0.64 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:114242 Archived-At: > Ok. Could you please then summarize what rules you have thought of > here? What is it that should be relaxed? What do you want to happen > then? What problems do you see for different solutions there? (Not the > algorithms, just the rules, please.) How can I give you rules if I don't know what kind of rules you expect. I can only guess, so let's take an example. Suppose I have two windows w1 and w2 one above the other: ------ | w1 | |------| | w2 | ------ When I want to enlarge w1 by one line I suppose I can do something like (wa-set-wrmin w1 (1+ (window-height w1))) (wa-set-wrmax w1 (1+ (window-height w1))) (wa-set-wrmin w2 (1- (window-height w2))) (wa-set-wrmax w2 (1- (window-height w2))) that is start with the tightest possible restriction. Now suppose I have a third window w3 ------ | w1 | |------| | w2 | |------| | | | w3 | | | ------ want to enlarge w1, but w2 has minimum height or is fixed-size (the latter is an example of a pending bug). In this case I probably first try the same as before, fail, and then do (wa-set-wrmin w1 (1+ (window-height w1))) (wa-set-wrmax w1 (1+ (window-height w1))) (wa-set-wrmin w3 (1- (window-height w3))) (wa-set-wrmax w3 (1- (window-height w3))) ------ | w1 | |------| | w2 | |------| | | | w3 | | | ------ If w3 has two subwindows side-by-side as in ------- | w1 | |-------| | w2 | |-------| | | | | w4|w5 | | | | ------- I probably have to do (wa-set-wrmin w1 (1+ (window-height w1))) (wa-set-wrmax w1 (1+ (window-height w1))) (wa-set-wrmin w4 (1- (window-height w4))) (wa-set-wrmax w4 (1- (window-height w4))) (wa-set-wrmin w5 (1- (window-height w5))) (wa-set-wrmax w5 (1- (window-height w5))) Now is that the way your algorithm is supposed to be used? [...] > You may have some very good point that I am totally missing. That will > show probably show up if we consider some more concrete example and > rules. Just tell me whether I got it right in my examples above or whether the "size applying stuff" is something you want to resolve with the help of another strategy within (case strategy ('eq-sizes .... martin