From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#55169: Can't combine window-min-height with window-height Date: Thu, 28 Apr 2022 20:58:18 +0300 Organization: LINKOV.NET Message-ID: <86y1zp5but.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39714"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu) To: 55169@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Apr 28 20:04:13 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nk8Uv-000A36-3u for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 28 Apr 2022 20:04:13 +0200 Original-Received: from localhost ([::1]:55582 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nk8Ut-0008B5-KX for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 28 Apr 2022 14:04:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34432) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nk8Uk-00089y-6d for bug-gnu-emacs@gnu.org; Thu, 28 Apr 2022 14:04:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:55986) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nk8Uj-0002IT-TY for bug-gnu-emacs@gnu.org; Thu, 28 Apr 2022 14:04:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nk8Uj-0002io-Pq for bug-gnu-emacs@gnu.org; Thu, 28 Apr 2022 14:04:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 28 Apr 2022 18:04:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 55169 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.165116901510426 (code B ref -1); Thu, 28 Apr 2022 18:04:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 28 Apr 2022 18:03:35 +0000 Original-Received: from localhost ([127.0.0.1]:49883 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nk8UJ-0002i1-Al for submit@debbugs.gnu.org; Thu, 28 Apr 2022 14:03:35 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:36396) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nk8UH-0002hr-Ch for submit@debbugs.gnu.org; Thu, 28 Apr 2022 14:03:34 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34246) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nk8UH-0007cV-7r for bug-gnu-emacs@gnu.org; Thu, 28 Apr 2022 14:03:33 -0400 Original-Received: from relay10.mail.gandi.net ([217.70.178.230]:46005) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nk8UF-0002Ew-BF for bug-gnu-emacs@gnu.org; Thu, 28 Apr 2022 14:03:32 -0400 Original-Received: (Authenticated sender: juri@linkov.net) by mail.gandi.net (Postfix) with ESMTPSA id 88F83240006 for ; Thu, 28 Apr 2022 18:03:28 +0000 (UTC) Received-SPF: pass client-ip=217.70.178.230; envelope-from=juri@linkov.net; helo=relay10.mail.gandi.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:230899 Archived-At: As bug#33007 revealed, window-min-height doesn't prevent from too narrow window height when using such call: (pop-to-buffer (generate-new-buffer "*edit string*") '(display-buffer-below-selected (window-min-height . 10) (window-height . fit-window-to-buffer))) Shouldn't the order of processing these parameters be rather like this: 1. first set window-height with fit-window-to-buffer; 2. then check if the constraint of window-min-height is fulfilled, and shrink too high window. Then the caller could insert the initial string, and 'fit-window-to-buffer' will fit the window. If the window height is less than 10 lines, it will enlarge to 10 lines. But in case of too many lines, the window height should not be more than half of the original window.