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 10:37:50 +0200 Message-ID: <4854D4DE.3090106@gmx.at> 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=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1213519186 8901 80.91.229.12 (15 Jun 2008 08:39:46 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 15 Jun 2008 08:39:46 +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 10:40:30 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 1K7nmj-0007h4-8L for ged-emacs-devel@m.gmane.org; Sun, 15 Jun 2008 10:40:25 +0200 Original-Received: from localhost ([127.0.0.1]:44483 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K7nlv-0004zk-4x for ged-emacs-devel@m.gmane.org; Sun, 15 Jun 2008 04:39:35 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1K7nlp-0004yJ-5t for emacs-devel@gnu.org; Sun, 15 Jun 2008 04:39:29 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1K7nlm-0004wg-Rb for emacs-devel@gnu.org; Sun, 15 Jun 2008 04:39:28 -0400 Original-Received: from [199.232.76.173] (port=35667 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K7nlm-0004wb-Es for emacs-devel@gnu.org; Sun, 15 Jun 2008 04:39:26 -0400 Original-Received: from mail.gmx.net ([213.165.64.20]:37243) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1K7nlm-00007i-34 for emacs-devel@gnu.org; Sun, 15 Jun 2008 04:39:26 -0400 Original-Received: (qmail invoked by alias); 15 Jun 2008 08:39:24 -0000 Original-Received: from 62-47-46-143.adsl.highway.telekom.at (EHLO [62.47.46.143]) [62.47.46.143] by mail.gmx.net (mp059) with SMTP; 15 Jun 2008 10:39:24 +0200 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX1/ilftXS/viNSI59ewWXFgD4G12OBLP/FUbL75KCA J1b7nNXM4D112H 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: 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:99247 Archived-At: >>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. In what sense is it 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. But `window-area-factor' is not customizable. In window_min_size_2 I currently use Fbuffer_local_value as int min_size = (BUFFERP (w->buffer) ? XINT (Fbuffer_local_value (Qwindow_min_height, w->buffer)) : window_min_height); Is that TRT? >>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. We could rule out splitting all windows showing a particular buffer by setting `split-height-threshold' and `split-width-threshold' nil for that buffer. Isn't that something we want in another context? >>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. Resolving size constraints is harder than balancing windows. Moreover it should be history sensitive: For example, when a window gets deleted it's entire size should be usually given to its previous sibling. At least this would hold for `with-output-to-temp-buffer' windows.