From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#24193: 25.1; `window-min-size' fails for horizontal width when margins >= body text Date: Tue, 09 Aug 2016 17:56:42 +0300 Message-ID: <831t1yhtxx.fsf@gnu.org> References: <1470734067.1046352.690034953.5B0A54FE@webmail.messagingengine.com> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1470754701 28527 195.159.176.226 (9 Aug 2016 14:58:21 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 9 Aug 2016 14:58:21 +0000 (UTC) Cc: 24193@debbugs.gnu.org To: Paul Rankin Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Aug 09 16:58:17 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bX8Tw-0007IJ-TO for geb-bug-gnu-emacs@m.gmane.org; Tue, 09 Aug 2016 16:58:17 +0200 Original-Received: from localhost ([::1]:36061 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bX8Tt-00012r-S1 for geb-bug-gnu-emacs@m.gmane.org; Tue, 09 Aug 2016 10:58:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60082) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bX8Tm-000123-Fr for bug-gnu-emacs@gnu.org; Tue, 09 Aug 2016 10:58:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bX8Ti-0004OV-H8 for bug-gnu-emacs@gnu.org; Tue, 09 Aug 2016 10:58:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:35966) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bX8Ti-0004OR-DV for bug-gnu-emacs@gnu.org; Tue, 09 Aug 2016 10:58:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bX8Ti-0000h2-6X for bug-gnu-emacs@gnu.org; Tue, 09 Aug 2016 10:58:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 09 Aug 2016 14:58:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24193 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 24193-submit@debbugs.gnu.org id=B24193.14707546272590 (code B ref 24193); Tue, 09 Aug 2016 14:58:02 +0000 Original-Received: (at 24193) by debbugs.gnu.org; 9 Aug 2016 14:57:07 +0000 Original-Received: from localhost ([127.0.0.1]:33260 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bX8Sp-0000fi-Hp for submit@debbugs.gnu.org; Tue, 09 Aug 2016 10:57:07 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:40466) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bX8Sn-0000fE-4h for 24193@debbugs.gnu.org; Tue, 09 Aug 2016 10:57:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bX8Se-000470-5f for 24193@debbugs.gnu.org; Tue, 09 Aug 2016 10:57:00 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:51812) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bX8Se-00046w-2K; Tue, 09 Aug 2016 10:56:56 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1752 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bX8Sd-00056W-5l; Tue, 09 Aug 2016 10:56:55 -0400 In-reply-to: <1470734067.1046352.690034953.5B0A54FE@webmail.messagingengine.com> (message from Paul Rankin on Tue, 09 Aug 2016 19:14:27 +1000) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:122015 Archived-At: > From: Paul Rankin > Date: Tue, 09 Aug 2016 19:14:27 +1000 > > There appears to be a change to `window-min-size' that gives an erroneously large minimum horizontal window size when the combined size of window margins exceed that of the body text, e.g. in a frame 80 columns wide, with left margin 20 columns and right margin 20 columns, would return a minimum horizontal size of 42, when body text would be 40. This causes `split-window-right' to fail. > > To reproduce: > > 1. emacs -Q > 2. in a frame 80 columns wide... > 3. M-: (set-window-margins nil 20 20) > 4. C-x 3 > => "Window # too small for splitting (2)" > 5. M-: (window-min-size nil t) > => 42 > > Expected results: > > Window should split horizontally. Minimum window width should not be dictated by margin width. > > Actual results: > > Margin width dictates minimum window width and prevents window splitting. I don't think I understand what exactly you expected to happen. In "emacs -Q" with no margins, "C-x 3" produces 2 windows: one that is 38-column wide, the other 37-column wide. Since you requested 2 20-column margins, they alone need 40 columns. How can Emacs produce a window with such margins out of 38 columns it has at its disposal? That isn't enough even for the margins, let alone the text area. In such a situation, I think refusing to split is a reasonable response: the user asked for something that is not doable. What alternative behavior did you expect? Thanks.