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: window-size constraints Date: Sun, 15 Jun 2008 00:06:50 +0200 Message-ID: <485440FA.4040300@gmx.at> References: <873anhkn4m.fsf@escher.local.home> <4853920E.9020106@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 1213481309 2414 80.91.229.12 (14 Jun 2008 22:08:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 14 Jun 2008 22:08:29 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jun 15 00:09:13 2008 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 1K7dvp-0002Qq-Sq for ged-emacs-devel@m.gmane.org; Sun, 15 Jun 2008 00:09:10 +0200 Original-Received: from localhost ([127.0.0.1]:46222 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K7dv1-00080Z-QL for ged-emacs-devel@m.gmane.org; Sat, 14 Jun 2008 18:08:19 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1K7dux-0007yP-AV for emacs-devel@gnu.org; Sat, 14 Jun 2008 18:08:15 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1K7duv-0007we-Lh for emacs-devel@gnu.org; Sat, 14 Jun 2008 18:08:14 -0400 Original-Received: from [199.232.76.173] (port=39976 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K7duv-0007wZ-Hf for emacs-devel@gnu.org; Sat, 14 Jun 2008 18:08:13 -0400 Original-Received: from mail.gmx.net ([213.165.64.20]:38245) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1K7duv-0005rR-1P for emacs-devel@gnu.org; Sat, 14 Jun 2008 18:08:13 -0400 Original-Received: (qmail invoked by alias); 14 Jun 2008 22:08:11 -0000 Original-Received: from 62-47-50-139.adsl.highway.telekom.at (EHLO [62.47.50.139]) [62.47.50.139] by mail.gmx.net (mp012) with SMTP; 15 Jun 2008 00:08:11 +0200 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX18onGQs5mUoDIrDzrIL2rbIuSyUaJnXhAeNp+URfD 4vE4E8kYAA4Qsu User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: de-DE, de, en-us, en In-Reply-To: X-Y-GMX-Trusted: 0 X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) 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:99226 Archived-At: > I think we should go in the direction of "constraints", which would take > the form of Elisp functions. Every configuration change would > correspond to adding&removing constraints, and then try and solve the > resulting CSP. Constraints would come with priorities so that in the > case the CSP has no solution, we can choose which constraint(s) > to break, or alternatively, the satisfaction of a constraint would not be > boolean, so the goal would be to try and maximize the satisfaction. We'd still have to decide whether and how to honor buffer-local values of variables like `window-min-height' or `split-height-threshold'. > While writing the balance-window-area code, I went through several > iterations, and some of them just tried to move window-boundaries in > arbitrary ways, then measure the "balance-factor" (basically, the > window-area variance) and little by little move towards > a local optimium. > > Also, I have some uninstalled code that uses > window-configuration-change-hook to preserve the > `balance-window-area'ness of a frame when windows are created/deleted. When the window configuration changes Emacs often tries to preserve proportionally the size of non-fixed size windows as faithfully as possible. How would `balance-windows-area' help here? Doesn't it try to give all windows the same size? The doc-string isn't of much help here :-(