From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.bugs Subject: bug#55169: Can't combine window-min-height with window-height Date: Mon, 2 May 2022 09:37:46 +0200 Message-ID: References: <86y1zp5but.fsf@mail.linkov.net> <87czh0gp6m.fsf@gnus.org> <9753db0e-05f2-5927-80fb-50d17f16441d@gmx.at> <86czgxi3nn.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32025"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Lars Ingebrigtsen , 55169@debbugs.gnu.org To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon May 02 09:38:16 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 1nlQdL-00086p-8S for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 02 May 2022 09:38:15 +0200 Original-Received: from localhost ([::1]:48584 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nlQdJ-0001X5-Aw for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 02 May 2022 03:38:13 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35864) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nlQd8-0001W0-Hq for bug-gnu-emacs@gnu.org; Mon, 02 May 2022 03:38:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:40799) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nlQd8-0006I8-9M for bug-gnu-emacs@gnu.org; Mon, 02 May 2022 03:38:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nlQd8-0004u5-7C for bug-gnu-emacs@gnu.org; Mon, 02 May 2022 03:38:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 02 May 2022 07:38:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55169 X-GNU-PR-Package: emacs Original-Received: via spool by 55169-submit@debbugs.gnu.org id=B55169.165147707518836 (code B ref 55169); Mon, 02 May 2022 07:38:02 +0000 Original-Received: (at 55169) by debbugs.gnu.org; 2 May 2022 07:37:55 +0000 Original-Received: from localhost ([127.0.0.1]:34696 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nlQd1-0004tk-HX for submit@debbugs.gnu.org; Mon, 02 May 2022 03:37:55 -0400 Original-Received: from mout.gmx.net ([212.227.15.15]:45243) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nlQd0-0004tY-AZ for 55169@debbugs.gnu.org; Mon, 02 May 2022 03:37:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1651477067; bh=ZNvnKlfROiNXMsqE7F4jeN+Dv7UsCsUTdtFaA92bOP8=; h=X-UI-Sender-Class:Date:Subject:To:Cc:References:From:In-Reply-To; b=kc9DwRg742+TBc4aIS+WkRWWEyOFcJ0aP0Pu5yyFIL0H4t5WHDzS3Bk3NhFAHVfLa 2V9MLspARU2vaP6x/2w+7jMlcklUrGkHfOlHxiWw9HbwRfcPORre/gDkwTFnY+6BES Wsq2Px/7UysGgIJY0vBjTJwmwzfKX3PaB4+U7SRo= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from [192.168.1.101] ([212.95.5.130]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MIwzA-1nR8aH21YQ-00KOex; Mon, 02 May 2022 09:37:47 +0200 Content-Language: en-US In-Reply-To: <86czgxi3nn.fsf@mail.linkov.net> X-Provags-ID: V03:K1:uZfTYhc6SxhhQxIjdqz52lFHw+6SOXgN6ziO05yyOCrNUW6Ysse maTKChm0trnjBKiyxws5dWoNRlKp3tpM2SLmB5h/ZKLnHB3YazlLUwplUBZO4cK5rC9dQ+2 nLThQ0WjujAGxgQwnosF2kiJufME3oPkPcQdptEkKY/HckvcVjizLx4clXRwRsMBEIQIsXG feXL69f0OsgxT+pupb3Rw== X-UI-Out-Filterresults: notjunk:1;V03:K0:ihd/7H/V6MM=:aGgOO9u6+xc4TdB5I/c9xO jr9jJqwk0IzkdI2NFfvqTy67zTe/TV5GaRYZQv3JobIHsL0MjYbbx1fJXFrxz0RjVwnncnCPN Ic6w6n+Jkt2UGO8TjoJzP49uhemFFd1/ZH6n0vSlkXRI5ja0hWZjHJrVyNFgOoqibx3YfC8wr pZAtCp8kv/kh3udeIClwAPMI5BqeY60NUbgfiLhpfESRlPEc+tbLN/MQmiykSwxTaiR8u6wAE WSVjcwEZFEywf94RZbUy4IOisZqNHDqhluMCThAUAX9Rs8h+mqwBXG3jPAVeTRnFgDvKOBnYN VhhKmdYEaDnglxxqVYfX+HVtjc+MxWN5MLUyHG2GOVfgnoof2dX2d2CgezbpkUSn1ydvIfh92 uY3pBYM/tSjwzh7NJYE7jFwINrXWK4yamOQTDDI9eFvPRovFT7PFDD0YTdIgfgCoD5PJ37WfR s2p2jIKcjWlQnEFTTYPFJRKnFz/4aHPWHqOe4I+aU9Wq83DmpM/un/Ex5P+yAa/dEzre4fsW8 /GMpR5/QiMBcBLPXehKWjkdG/PMiuPkx5KOiO1T3JVT/kvrBijTSJjTcoLjyaJfxgKkw/L/Ip UsR4yy4a5W1lSFh/K8fYwp22F3Kwv284/Eb2mAycWSiJsRPH/DXDoFn6PaBERQF4pbtxDWvFH TQ/x2DldfvhVnVy2jINAo2yH0echN31XzuaNC5/c/ftJANG7pmc3SvDeXbiUM18oLlfeDF8jb 1z0Fgt4Ze2qCDt8my0GcJWSJBZICpOwUFRw7qeVxTNUYKjFBAebb4ZSmojdbYTfLt9Xs46wT 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:231227 Archived-At: > Maybe as a workaround two calls of display-buffer would do the trick? > The first call display-buffer-below-selected will split the window, > then the second call display-buffer-use-some-window will adjust the height. There would be no benefit in doing such a thing. The first call might not be able to produce a window that satisfies the 'window-min-height' constraint. A correct solution would be to, before splitting, check whether the split off window can be made as high as wanted. For that, we would have to investigate all possible splittings over all actions allowed by the ALIST argument to check whether the emanating split would satisfy the height constraint (where the maximum possible height of a split off window would be the sum of the total sizes minus their minimum sizes of all windows in the same combination as the split one). Our current strategy to usually split just the largest or LRU window is much too naive in this regard. The problem with a new approach is that we would have to tell people that when a 'window-min-height' entry is present, the display strategy they got used to may change - the new window might appear in a non-standard position. Who's to blame? The one who bona fides added the 'window-min-height' constraint in a call or the people who changed the semantics of 'display-buffer'? BTW I do not understand well in which sense your original scenario (pop-to-buffer (generate-new-buffer "*edit string*") '(display-buffer-below-selected (window-min-height . 10) (window-height . fit-window-to-buffer))) fails. Do you mean that the window should be at least ten lines high despite of the fact that it's fit to an empty buffer? martin