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#63455: 30.0.50; display-buffer-in-direction is always resizing Date: Sat, 20 May 2023 10:27:41 +0200 Message-ID: References: <87fs82z7cw.fsf@web.de> <77edb1db-13ad-fa1d-d1fc-7a23f0b6240d@gmx.at> <86jzx6lvxz.fsf@mail.linkov.net> <86o7mgb4z2.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="28368"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Michael Heerdegen , 63455@debbugs.gnu.org, dgutov@yandex.ru To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat May 20 10:28:17 2023 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 1q0Hwm-00078W-DD for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 20 May 2023 10:28:16 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q0HwZ-0005Kh-J8; Sat, 20 May 2023 04:28:03 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q0HwY-0005KP-G0 for bug-gnu-emacs@gnu.org; Sat, 20 May 2023 04:28:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q0HwY-0002kG-7G for bug-gnu-emacs@gnu.org; Sat, 20 May 2023 04:28:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1q0HwY-0001hY-2t for bug-gnu-emacs@gnu.org; Sat, 20 May 2023 04:28: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, 20 May 2023 08:28:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63455 X-GNU-PR-Package: emacs Original-Received: via spool by 63455-submit@debbugs.gnu.org id=B63455.16845712746524 (code B ref 63455); Sat, 20 May 2023 08:28:02 +0000 Original-Received: (at 63455) by debbugs.gnu.org; 20 May 2023 08:27:54 +0000 Original-Received: from localhost ([127.0.0.1]:57828 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q0HwQ-0001h9-9V for submit@debbugs.gnu.org; Sat, 20 May 2023 04:27:54 -0400 Original-Received: from mout.gmx.net ([212.227.15.18]:36041) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q0HwN-0001gv-Mv for 63455@debbugs.gnu.org; Sat, 20 May 2023 04:27:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.at; s=s31663417; t=1684571265; i=rudalics@gmx.at; bh=HCRwX6PEuBIwutY+jUwmgLp/RtPkxU8CPr3YAEEsEsM=; h=X-UI-Sender-Class:Date:Subject:To:Cc:References:From:In-Reply-To; b=YQl36V8zybPweWz9/UoW3p6IugqYKgWY4+G8/CFckFYOiIPc9pmCys0Ah4YFib7I7 ACFlb5bBjs8Bp7EhsQ3Zn3ECQ2D+eft7epPxazq7U4tWkyA/Z8gesXJhS8keqj/5lb v6yzZPL7ipkSy3+cmwLS78RtIjoJvwTaXGUwJDW6XeSBXhS5Gb4m+AiDLu6qaAxLcn m2jKJrJZMW42gPMFv26wcGAmtlRpWYziNPTt6PHsCzfeuzVMLBW5IRep87IVKbOG6m 5BRvJOZJRIeYCoLQqJT721SQu1PCF1qJuWHb4QByChmnuaM717QJ6KowRqG1FWhewd 9zSbONIx+Mo+A== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Original-Received: from [192.168.1.100] ([213.142.96.55]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1N1fn0-1q6rVY3tsG-011xeM; Sat, 20 May 2023 10:27:45 +0200 Content-Language: en-US In-Reply-To: <86o7mgb4z2.fsf@mail.linkov.net> X-Provags-ID: V03:K1:W9ggDbbCe1B6mCussN6xFuC9Y6IVKAlWPkPk715uAZoVwMJuUmH chcjnSFrFVzZlTJ5iYmMLIoFZVn9c3ZNbLbUiH3K52BZDjSF0E/OMiYWgTPRzwpEPmWc8iI WYeYexvnECXJVaAnJH7w8bL30F6Dy0XYtL+sDwoM5s7NGtKwBWuFbIg8kQVczso1q9YCBug LqJTq9if8dxCxUjTgFggQ== UI-OutboundReport: notjunk:1;M01:P0:hG7xg78fjRg=;gDgUtZETaEKSC+FXsPeIIpcXxJ4 IIObfqf6qJk1UvRMXL5UVmvUC0R1Z4Hz2yq0uELnVxSIlnqRirOMWs9D9pd0n5aLy8X/yL/xm A3cS2OJpW5tiqkncbEzLfRAxhHhg3l33toxLLWujdgaX8DawLzO29PkYkP7mESGnlCopTgFvh KYhd7YYwJP9FI3i9JdA4Bxy9hNLMV3dkP2QF/qIUbJOtVS6Q1XLwVto//AeGayfoC6K1Wtvoj UqY6eDtmG+TcJhprJvrYznzfGEm6RnspX/rG+PCkQPfHmc8UfF84VZYH6vimX83EpnPO4YA+u c2u/OCbo3ilX7KZ7ZEOtlP5wPTSah8kn7v/v7oNHUOdoIMv5wwWJYmAQ1ESxz9NDy/59SKB0I 2ZmyNmSITre0G7ZbQD8QdHIwI9BZqmUunR15cRSiYwZrwKi6XDVZqjFkjYXC4zEkV2pU8dCJV DUwpTr373nRN2eU/iNFf2grqbNoUW6l0qL3NpV4JNKNqUO2Y8PqsgWpQTEDzxuvjCfqY52Vd0 8g5ZxCOWAlZo3uM0VC/uFL9Ae7AlVt7NeZln3gQDjpfFbXypjr7C61wehDX7mVhyoY1izv66u a+wpJe5HZ8kodcOgzWSdM4zndjcUHEuSG6ImqkWmd/OiZ+7MxEV7JswfJn5Jg7I8z8T4Sxdno vreWIZWjtiP5Q6bR3jTdW6bsSP5wJWFsJK8jKDhSqic1/1gYQjcPdeT/vPTyimGk+ft4HCDXx ptRPi20D4R6rw1gKpxRahEO//f4nO0hW6Xha/2bEAODRLQcQWUoxZKg/Y8vay6ekhNLZuT0+ 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:262038 Archived-At: >> Almost (I had to make 'ediff-setup-windows-plain-compare' do what your >> patch does). But as I mentioned earlier, you might want to replace >> 'fit-window-to-buffer' with something conditioned on whether the user >> has customized 'temp-buffer-resize-mode' - some users simply might not >> want their windows to auto-resize. > > I still don't understand the need to add a new function. The new function would serve, for example, in 'ediff-setup-windows-plain-compare' (select-window (display-buffer-in-direction control-buffer '((direction . bottom) (window-height . fit-window-to-buffer)))) to make sure the window is fit iff 'temp-buffer-resize-mode' is enabled. > When users don't want their windows to auto-resize, > then they can simply do: > > (add-to-list 'display-buffer-alist > '("*Help*" nil > ;; Inhibit resizing Help buffers > (window-height . nil))) A user who has not set 'temp-buffer-resize-mode' does not want auto-resizing to happen and probably does not want to deal with 'display-buffer-alist' either. In either case, the new function is not relevant to your example. That setup doesn't work with 'temp-buffer-resize-mode' turned on because 'help--window-setup' ignores 'display-buffer-alist' when it does (when (and window temp-buffer-resize-mode) (let (resize-temp-buffer-window-inhibit) (resize-temp-buffer-window window))))))) All this has become very contrived because of 'help-make-xrefs'. I suppose we have to (1) make 'temp-buffer-windo-show' return the function 'display-buffer' would have used to resize the window if NO-RESIZE had allowed it to do so and (2) have 'help--window-setup' apply the return value, if non-nil, to resize the window after calling 'help-make-xrefs'. If worse comes to worst, 'help--window-setup' may have to investigate the current value of 'resize-temp-buffer-window-inhibit' too ... martin