From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#36859: Customizable fit-window-to-buffer Date: Sun, 04 Aug 2019 00:16:45 +0300 Organization: LINKOV.NET Message-ID: <87wofuue1e.fsf@mail.linkov.net> References: <87sgqnp9z8.fsf@mail.linkov.net> <6a42d2af-b17a-d2da-1c3c-655f3f2a356f@gmx.at> <87sgqmq67t.fsf@mail.linkov.net> <1d94d43d-45d8-c917-426f-f3ba8c0feabf@gmx.at> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="119961"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) Cc: 36859@debbugs.gnu.org To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Aug 03 23:42:12 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hu1mz-000V1X-DB for geb-bug-gnu-emacs@m.gmane.org; Sat, 03 Aug 2019 23:42:10 +0200 Original-Received: from localhost ([::1]:42148 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hu1mx-0006QG-PG for geb-bug-gnu-emacs@m.gmane.org; Sat, 03 Aug 2019 17:42:07 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57281) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hu1mu-0006Py-0b for bug-gnu-emacs@gnu.org; Sat, 03 Aug 2019 17:42:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hu1mt-0003qk-20 for bug-gnu-emacs@gnu.org; Sat, 03 Aug 2019 17:42:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:51333) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hu1ms-0003qe-V3 for bug-gnu-emacs@gnu.org; Sat, 03 Aug 2019 17:42:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hu1ms-0002M6-Sf for bug-gnu-emacs@gnu.org; Sat, 03 Aug 2019 17:42:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 03 Aug 2019 21:42:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36859 X-GNU-PR-Package: emacs Original-Received: via spool by 36859-submit@debbugs.gnu.org id=B36859.15648685029014 (code B ref 36859); Sat, 03 Aug 2019 21:42:02 +0000 Original-Received: (at 36859) by debbugs.gnu.org; 3 Aug 2019 21:41:42 +0000 Original-Received: from localhost ([127.0.0.1]:60153 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hu1mY-0002LK-2H for submit@debbugs.gnu.org; Sat, 03 Aug 2019 17:41:42 -0400 Original-Received: from bonobo.elm.relay.mailchannels.net ([23.83.212.22]:26334) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hu1mU-0002LA-Jj for 36859@debbugs.gnu.org; Sat, 03 Aug 2019 17:41:41 -0400 X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 834F7501F94; Sat, 3 Aug 2019 21:41:37 +0000 (UTC) Original-Received: from pdx1-sub0-mail-a75.g.dreamhost.com (100-96-11-214.trex.outbound.svc.cluster.local [100.96.11.214]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id B204C501E6F; Sat, 3 Aug 2019 21:41:34 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from pdx1-sub0-mail-a75.g.dreamhost.com ([TEMPUNAVAIL]. [64.90.62.162]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.17.5); Sat, 03 Aug 2019 21:41:37 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Eyes-Abiding: 265a406d1ada3f1a_1564868495003_2857214656 X-MC-Loop-Signature: 1564868495003:2444503678 X-MC-Ingress-Time: 1564868495003 Original-Received: from pdx1-sub0-mail-a75.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a75.g.dreamhost.com (Postfix) with ESMTP id 114057F0F9; Sat, 3 Aug 2019 14:41:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=linkov.net; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=linkov.net; bh=R2TtWeCQhu0RwftbfTltmWNkE3Q=; b= 1ECi+HErvuHn717GAVKUdpKxlygSxh/aSNqifjwhD3qmVVOa+fDsV3SOaRjRHnQy qQU7MlIJfHRzHX0X3Ws5/VKGDBmPwQsoKMDQHC7QgpFP9l9P14YHMIlhxhWf4/Uj BAUqF0I0T7DJbefqoUTMWCkFpgbL/wpSPadaIWgcWv0= Original-Received: from mail.jurta.org (m91-129-103-76.cust.tele2.ee [91.129.103.76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: jurta@jurta.org) by pdx1-sub0-mail-a75.g.dreamhost.com (Postfix) with ESMTPSA id 49BE77FEB7; Sat, 3 Aug 2019 14:41:26 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a75 In-Reply-To: <1d94d43d-45d8-c917-426f-f3ba8c0feabf@gmx.at> (martin rudalics's message of "Sat, 3 Aug 2019 09:57:48 +0200") X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeduvddruddtvddgvddtucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufhofhffjgfkfgggtgesthdtredttdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucfkphepledurdduvdelrddutdefrdejieenucfrrghrrghmpehmohguvgepshhmthhppdhhvghlohepmhgrihhlrdhjuhhrthgrrdhorhhgpdhinhgvthepledurdduvdelrddutdefrdejiedprhgvthhurhhnqdhprghthheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqedpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnrhgtphhtthhopehruhgurghlihgtshesghhmgidrrghtnecuvehluhhsthgvrhfuihiivgepud 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: 209.51.188.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:164501 Archived-At: >> I hope it would be possible to specify a special action alist entry >> in 'display-buffer-alist' , e.g. >> >> (window-height . no-fit-window) > > Wouldn't just (window-height) suffice? Maybe, I'm not sure if the case when window-height is missing in alist can be distinguished from the case when window-height is nil. >> Do you think this is feasible? If not, then maybe these commands >> should provide post-display hooks such as e.g. 'proced-post-display-hook' >> where 'fit-window-to-buffer' is added by default, but can be removed >> by customization. > > We could introduce a new ALIST argument, say 'pre-display-function'. > The function specified there would be called before running the body > of 'window--display-buffer'. In the case at hand, that function would > fill the buffer so OT1H 'shrink-window-if-larger-than-buffer' would > know the real buffer size and OTOH a 'window-height' entry would allow > to override that. I wouldn't know whether and how to suitably pass > any arguments to such a function, though. Or maybe 'shrink-window-if-larger-than-buffer' could be added in the body of another new ALIST argument 'post-display-function'.