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: Sat, 7 May 2022 09:58:48 +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> <86tua7pyfp.fsf@mail.linkov.net> <5e93dcad-4071-b4e2-d408-ba670413eb67@gmx.at> <868rriil03.fsf@mail.linkov.net> <0e9b53c4-b283-ca20-fa8a-995f2b58ed59@gmx.at> <865ymlje5o.fsf@mail.linkov.net> <8ae5e6ac-25f5-3feb-b05b-fbdb71e7ac1d@gmx.at> <864k24v0vo.fsf@mail.linkov.net> <865ymkrmze.fsf@mail.linkov.net> <86v8ujcd2r.fsf@mail.linkov.net> <3f7b273c-59f4-5486-728e-a0c8e09190a7@gmx.at> <86bkwahe5g.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="8069"; 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 Sat May 07 09:59:20 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 1nnFLU-0001yI-N8 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 07 May 2022 09:59:20 +0200 Original-Received: from localhost ([::1]:34518 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nnFLT-0008NN-BV for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 07 May 2022 03:59:19 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33018) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nnFLC-0008Mg-S2 for bug-gnu-emacs@gnu.org; Sat, 07 May 2022 03:59:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:56404) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nnFLC-0005Iw-JC for bug-gnu-emacs@gnu.org; Sat, 07 May 2022 03:59:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nnFLC-0002qG-Ga for bug-gnu-emacs@gnu.org; Sat, 07 May 2022 03:59: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: Sat, 07 May 2022 07:59: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.165191033910914 (code B ref 55169); Sat, 07 May 2022 07:59:02 +0000 Original-Received: (at 55169) by debbugs.gnu.org; 7 May 2022 07:58:59 +0000 Original-Received: from localhost ([127.0.0.1]:50301 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nnFL9-0002py-AP for submit@debbugs.gnu.org; Sat, 07 May 2022 03:58:59 -0400 Original-Received: from mout.gmx.net ([212.227.15.19]:42695) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nnFL6-0002pj-Kg for 55169@debbugs.gnu.org; Sat, 07 May 2022 03:58:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1651910330; bh=Ls0cDhay4vEnsaYlMzu/XkR851YMOkz8ODmMHJxuogI=; h=X-UI-Sender-Class:Date:Subject:To:Cc:References:From:In-Reply-To; b=R0bgA1+wcNh77PZ134wH3jsze+QJmCwndjhBMSP53hq9NQNy9QCL37ie6g6F+b1Yc gA0n6nn45TjuQK83594dK/JgkyGClWI7GAVoChQ2TKwY0mlgDRoLEfRmetlWUXZC8B SCjcH6KC+2rNLbNE/NYfEqA13LNvmOAqMb7l+Q+M= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from [192.168.1.101] ([212.95.5.205]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1Mr9Fs-1o7hyG0HpO-00oIpg; Sat, 07 May 2022 09:58:50 +0200 Content-Language: en-US In-Reply-To: <86bkwahe5g.fsf@mail.linkov.net> X-Provags-ID: V03:K1:ZrKVRWvMquUpyJhcohck/FPuYaBIZjmdbPRm2FJJhBgJj52UXZF +PzDLgIDcx4cDFHhApYiUZ/jQExfRYe/t5zl3WcnNqQakVWeibEhkpoiT1nFm/ef0xfQEu3 N2iFXyubnNs9b5SLZkE13wBanm+uxBJM9od8hgkDNlKrkJnMxZPdTWRW5gG03PNln3RT2pY AarDs352JC8eXhlzNM/jg== X-UI-Out-Filterresults: notjunk:1;V03:K0:t7dI5nSmyQY=:1uFEWruTB7X78wiRzLjkNR Cpu9Ayk6PLAgXMlncc0AxvBvQxoOOZBz+V4fco5kYziWM3ADkiNZeqoT9myNIzBHrXZB/7wzl ELyUviwKAh9zIqnj1Hwb2YEqiw5IEo3Ac2CrcxQGykiyTHBKABwSIAO9bVU1dOvOZbaRVZvRV V2o4uSuk4EAJ86dOgBH9W1iEESKfive+PzMT0kiyMPLm+amVksxqTZxF75JmjEdQxCoLFQy5H XmZG+yY5+RiRe1552d58yS+I4mnDM8bXP8x0/FV0K1nWVvuofRmhn8k8A9VMOwS4VRX/KK7gL 7R9Kexhs1FTJQEq/IVb8yoBxZbDYyM2ct41Cikc/MjhkB53EPQ8Lpv5LKYXd2nN4gM+DynWaq dpyAqULITiuHdcmDY/d9D6DnSHkcCrB0GejVuEjCPZE00L3/Ps8meY/xI7/zD2Nb7aK+JRszp B0oLO+ILJkURCKrga1/ED/i4IokycwfwE80mV7fK6oWWEFi01luzegKub41kwm2ojOql1qwxd SHsILuTVxQnT9eoGos5+64BUcWMdTDNTQtGZC2G5jmZ+Le+YkV2OINVCUpfmbWnXHtIYoqht/ e2yzwc3MaOnA5We+m6K4/KZZEBlbbYpzjVlsge/2XY1cJqFiXgb+RjbWlGILlIcyLxPpehUqe fCvuyqvb8HvNl3HRRF+L17PSwNG6WJ9+a5PBCHKSo5dBgEdULtYN8iyygT8IqBHDYG0VCS3bX uS1BrrzbkntmFoy3mGmove3/RDmCd57065ybUsET4b77zJBgkoYuLEeG5XAeiJCoJaxsVE9w 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:231557 Archived-At: > Then this could be an easy to explain rule. I'm only unsure about the > WINDOW argument. What if another function has a WINDOW argument in > another position, not the first? Maybe better to allow a lambda like this: > > (pop-to-buffer (generate-new-buffer "*edit string*") > '(display-buffer-below-selected > (window-height . (lambda (window) > (fit-window-to-buffer window nil 10))))) Sounds too complicated IMO. Let's stick to your earlier proposal as (ignore-errors (if (eq height 'fit-window-to-buffer) (fit-window-to-buffer window nil (cdr (assq 'window-min-height alist))) (funcall height window))) say something like "As a special case, if `window-height' specifies `fit-window-to-buffer' and ALIST contains a `window-min-height' entry, pass the value of that entry as MIN-HEIGHT argument to `fit-window-to-buffer'." and do a similar thing for `window-min-width'. And if we really want to, we can always add a MIN-HEIGHT argument to 'shrink-window-if-larger-than-buffer' and handle it the same way. martin