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: Fri, 12 May 2023 09:39:40 +0200 Message-ID: <77edb1db-13ad-fa1d-d1fc-7a23f0b6240d@gmx.at> References: <87fs82z7cw.fsf@web.de> 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="36822"; mail-complaints-to="usenet@ciao.gmane.io" Cc: dgutov@yandex.ru, juri@linkov.net To: Michael Heerdegen , 63455@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri May 12 09:40:22 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 1pxNO2-0009PM-0O for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 12 May 2023 09:40:22 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pxNNq-0007UE-Nu; Fri, 12 May 2023 03:40:15 -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 1pxNNj-0007Tx-W8 for bug-gnu-emacs@gnu.org; Fri, 12 May 2023 03:40:04 -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 1pxNNj-0004kM-Lw for bug-gnu-emacs@gnu.org; Fri, 12 May 2023 03:40:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pxNNi-0000aH-BB for bug-gnu-emacs@gnu.org; Fri, 12 May 2023 03:40: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: Fri, 12 May 2023 07:40: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.16838771912215 (code B ref 63455); Fri, 12 May 2023 07:40:02 +0000 Original-Received: (at 63455) by debbugs.gnu.org; 12 May 2023 07:39:51 +0000 Original-Received: from localhost ([127.0.0.1]:53957 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pxNNX-0000Zf-CL for submit@debbugs.gnu.org; Fri, 12 May 2023 03:39:51 -0400 Original-Received: from mout.gmx.net ([212.227.17.22]:46301) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pxNNV-0000ZS-G5 for 63455@debbugs.gnu.org; Fri, 12 May 2023 03:39:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.at; s=s31663417; t=1683877182; i=rudalics@gmx.at; bh=Wd0/r03+GBue3pizsqZ29N1kkWrJdJTjPaxWd+42VFo=; h=X-UI-Sender-Class:Date:Subject:To:Cc:References:From:In-Reply-To; b=FZ7bxmLl7+2pQf91I1TFQUkUMwg5zOFlUD2Lawa2spLtw0zP8ubjB1e+W2nx+7wKV sCWy0kLxe8aMBVbSzCPmCe07Y3s70QYtxCI/WitKIUWoiwGmXS64mJ3mBsRXJ8pUv8 jTbXszUY5pPjWPlTXMzKVwjwu00qeRwJgGhwdyFrxXd4/tJxTlrwbTCqRJQDoyWp/z saBYdWf+Qd8wufTAHpksETMt3vY3e9li8MVI32SlffO0Yhs9b1uvN4l5S6i+MHUH1u VnnyKpMrqUpA6FF/iVWA6cYyaIT2aKokFE/OnXmJ+/E68/vUUr9DRHObYxZg08HDpW cvJcmU6ulmJAQ== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Original-Received: from [192.168.1.100] ([212.95.5.175]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1N4hvb-1qMhqb2eox-011jqk; Fri, 12 May 2023 09:39:42 +0200 Content-Language: en-US In-Reply-To: <87fs82z7cw.fsf@web.de> X-Provags-ID: V03:K1:HS6k0i7XhGINYspODjOtPKVaghkFjz7VBKb9OzRbvl0Le2JSpEj zfZl8ZEM1iQjbogTNV7CLfZ06k1fBjTlAN/aBIChPJxJ87phpPV7CSn3b+0AkQ8HxNaP+vZ tB37KNNMeVwU4pkqNI6OKAck3dLFsJBztizEewXruPL8jAyr8/z2us8Gi44Ej0OfyFueCD0 8vy1KIFDZOy0cn4hIE3Yg== UI-OutboundReport: notjunk:1;M01:P0:WWhKt8Y+Uu0=;TGF2guqxVdVTtQCa4cdKEwWzAFV fy6XzkfBKOkNWS5DtlPnPcb/tdDXumc3XJHnWrI4+T8LhIRABv24PJ0ejiVNKG27nEx3+Hg5C XZrvY0bkq+6D/V9kD/qITCXeX5AonvSmVSD85goE1KAwWRn7Z/Uj7Dyo9xnT3qyPCTfVZfDyt 7VGCfpgHqof4bwzXz/DCvHwcaqTYOf2WlKjH2UWwEUBJwSQ0VfRIunJ+ZOZexXcMhRrld1Qd8 x/Sr+0DdJeVzadIlaz6N2xEzVVaKZkGg+FalnJOaSKyA4HYYCkGHl5XdbMf3VEAAY613GPYWy 6cVfHglF6WCe/dUhm9Yr4C27Dgp8JHMTyZpa6Os1Lf72GGbmSELUVstYT+pxnxJ7UKROT4uPG 4lsYCXBnGLvo+i73YluOS2R3TIEAXVR+woDFae4E4PqVkErLjACERQrdf57gjaohNy5s7jaZc a0fN7SMR5SKhzo6RtQrfGskAmzQNkjT6+PmNmz/FEq6stOengmxvg8mWWHdnfhf6iRXNahXnW ROs62AceGru/D1VrPnrLcmEsnW6YPGOzaDpNAWAhfGjdVYlYolFOyC3KID+8Cnf7eNZfOG3Lr 0m84QPiBbPU8/Sz6+E883R8WuhY4pBj+AY0HNEUQ9p7u37A6eE0tSRN35TG9WBVcwlyzZbW2Q 7VX5n051B9VKerod2bX8tCJum/LUE8LvleYLkxwXtRSXpv9vZJyaNPteq9iobUWfWacEXib8t USZIGipJ5BSD4PqgRMzfMGuv/dUlkhjA5PaGJzn3HaN5cPCpU08SshCi8lpiid1b/64/jRUK 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:261615 Archived-At: > OTOH, the action `display-buffer-in-direction' _always_ resizes the > window no matter what buffer is current. Try e.g. > > #+begin_src emacs-lisp > (display-buffer (current-buffer) > '((display-buffer-in-direction) . ((direction . top)))) > #+end_src > > from any window or buffer. > > This is handled by this part of the implementation of > `display-buffer-in-direction': > > #+begin_src emacs-lisp > (setq alist > (append alist > `(,(if temp-buffer-resize-mode > '(window-height . resize-temp-buffer-window) > '(window-height . fit-window-to-buffer)) > ,(when temp-buffer-resize-mode > '(preserve-size . (nil . t)))))) > #+end_src > > Looking at that it doesn't seem to be intended as a general behavior, > and the behavior is not a good default IMO - even if it can be > suppressed by adding a (window-height . nil) entry to the > `display-buffer' call. > > I guess that Bug#45945 could be a symptom of this problem. I think you're right. In my local Emacs I removed both incarnations of that code (the other one being in 'display-buffer--maybe-at-bottom') long ago. I can only shortly sketch how I manage things here: The end of 'help--window-setup' has become (help-window-setup (setq window (temp-buffer-window-show (current-buffer) nil t))) (help-make-xrefs (current-buffer)) (when (and window temp-buffer-resize-mode) (let (resize-temp-buffer-window-inhibit) (resize-temp-buffer-window window))))))) 'temp-buffer-window-show' has a third argument NO-RESIZE and its last lines are rewritten as (with-selected-window window (run-hooks 'temp-buffer-window-show-hook) (when (and (not no-resize) temp-buffer-resize-mode) (resize-temp-buffer-window window))) ;; Return the window. window)))) Maybe Juri can make heads or tails of this. martin