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: window-size constraints Date: Sat, 14 Jun 2008 22:01:08 -0400 Message-ID: References: <873anhkn4m.fsf@escher.local.home> <4853920E.9020106@gmx.at> <485440FA.4040300@gmx.at> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1213495283 29778 80.91.229.12 (15 Jun 2008 02:01:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 15 Jun 2008 02:01:23 +0000 (UTC) Cc: emacs-devel@gnu.org To: martin rudalics Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jun 15 04:02:07 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 1K7hZG-0002XN-7w for ged-emacs-devel@m.gmane.org; Sun, 15 Jun 2008 04:02:06 +0200 Original-Received: from localhost ([127.0.0.1]:54247 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K7hYS-0001rw-Am for ged-emacs-devel@m.gmane.org; Sat, 14 Jun 2008 22:01:16 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1K7hYO-0001rp-1H for emacs-devel@gnu.org; Sat, 14 Jun 2008 22:01:12 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1K7hYM-0001r7-G4 for emacs-devel@gnu.org; Sat, 14 Jun 2008 22:01:11 -0400 Original-Received: from [199.232.76.173] (port=33285 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K7hYM-0001r4-DX for emacs-devel@gnu.org; Sat, 14 Jun 2008 22:01:10 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.182]:44990) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1K7hYM-0005zD-4e for emacs-devel@gnu.org; Sat, 14 Jun 2008 22:01:10 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApsEAH8UVEjO+KWv/2dsb2JhbACBW6pe X-IronPort-AV: E=Sophos;i="4.27,646,1204520400"; d="scan'208";a="22644933" Original-Received: from smtp.pppoe.ca (HELO smtp.teksavvy.com) ([65.39.196.238]) by ironport2-out.teksavvy.com with ESMTP; 14 Jun 2008 22:01:09 -0400 Original-Received: from pastel.home ([206.248.165.175]) by smtp.teksavvy.com (Internet Mail Server v1.0) with ESMTP id VIQ26509; Sat, 14 Jun 2008 22:01:09 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id C59298336; Sat, 14 Jun 2008 22:01:08 -0400 (EDT) In-Reply-To: <485440FA.4040300@gmx.at> (martin rudalics's message of "Sun, 15 Jun 2008 00:06:50 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-detected-kernel: 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:99239 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' Of course, we have to honor it. It's already defined as buffer-local. It should be easy/trivial to support. At least window-area-factor was trivial and I see no reason why window-min-height should be any more difficult. > or `split-height-threshold'. I'm not sure I'd want to include display-buffer in this system, tho I guess it might make sense. > 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? I'm not referring to the functionality it provides, but to the way it does it, i.e. to its code. But it's really not that important: just let the C code do its thing, hoping it won't mess up majorly (i.e. it won't delete windows that don't absolutely need to be deleted), and then do the actual size-choice in Elisp by trying to resolve the CSP. > Doesn't it try to give all windows the same size? Yes, except for the window-area-factor detail, but again, this isn't relevant, really. Stefan