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: 23.0.60; Resizing may delete windows Date: Sun, 20 Apr 2008 15:29:48 -0400 Message-ID: References: <480B35D6.9080700@gmx.at> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1208719824 2264 80.91.229.12 (20 Apr 2008 19:30:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 20 Apr 2008 19:30:24 +0000 (UTC) Cc: emacs-devel To: martin rudalics Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Apr 20 21:30:59 2008 connect(): Connection refused 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 1JnfFY-0001c9-0j for ged-emacs-devel@m.gmane.org; Sun, 20 Apr 2008 21:30:56 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JnfEs-0007Oz-BZ for ged-emacs-devel@m.gmane.org; Sun, 20 Apr 2008 15:30:14 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JnfEV-000799-Gg for emacs-devel@gnu.org; Sun, 20 Apr 2008 15:29:51 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JnfET-00078N-PL for emacs-devel@gnu.org; Sun, 20 Apr 2008 15:29:51 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JnfET-00078F-Js for emacs-devel@gnu.org; Sun, 20 Apr 2008 15:29:49 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.182]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JnfET-0005ZJ-4T for emacs-devel@gnu.org; Sun, 20 Apr 2008 15:29:49 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AswEAOI1C0hMCqsI/2dsb2JhbACBUKc8 X-IronPort-AV: E=Sophos;i="4.25,686,1199682000"; d="scan'208";a="18795773" Original-Received: from smtp.pppoe.ca (HELO smtp.teksavvy.com) ([65.39.196.238]) by ironport2-out.teksavvy.com with ESMTP; 20 Apr 2008 15:29:48 -0400 Original-Received: from pastel.home ([76.10.171.8]) by smtp.teksavvy.com (Internet Mail Server v1.0) with ESMTP id AXX57748; Sun, 20 Apr 2008 15:29:48 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 5A661895A; Sun, 20 Apr 2008 15:29:48 -0400 (EDT) In-Reply-To: <480B35D6.9080700@gmx.at> (martin rudalics's message of "Sun, 20 Apr 2008 14:23: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:95533 Archived-At: >> It probably wants to delete the window because somewhere it (needlessly) >> tries to resize it (to a smaller size, probably) and then checks the >> size and decides to delete. The problem is right there: not in any of >> the settings of window-min-height. > Consider the following stretch from enlarge_window: > /* Add delta1 lines or columns to this window, and to the parent, > keeping things consistent while not affecting siblings. */ > XSETINT (CURSIZE (parent), opht + delta1); > (*setsizefun) (window, XINT (*sizep) + delta1, 0); > /* Squeeze out delta1 lines or columns from our parent, > shriking this window and siblings proportionately. > This brings parent back to correct size. > Delta1 was calculated so this makes this window the desired size, > taking it all out of the siblings. */ > (*setsizefun) (parent, opht, 0); > It calls size_window in the hope that size_window > (i) does not reduce the height of "this window", and > (ii) implicitly removes windows that have become "to small". > Now consider the code for changing the size of a frame: It eventually > winds up calling something like > set_window_height (FRAME_ROOT_WINDOW (f), > (newheight > - 1 > - FRAME_TOP_MARGIN (f)), > 0); > in the hope that size_window > (i) does not delete windows when they become "to small", as long as > (ii) there's at least one larger window it can steal lines from. > So it seems we want to eat our cake and have it too. Yes, fixing the behavior with the current code is problematic. We probably need to rethink/reimplement the window-resize code to fix it. Stefan