From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#45688: 28.0.50; New action for display-buffer? Date: Tue, 19 Jan 2021 04:26:42 +0100 Message-ID: <878s8psj2l.fsf@gnus.org> References: <87im8a1dff.fsf@gnus.org> <83y2h6133r.fsf@gnu.org> <8735ze0yp7.fsf@gnus.org> <83o8i20w1f.fsf@gnu.org> <87lfd5yny9.fsf@gnus.org> <87o8i03gem.fsf@gnus.org> <528b7d6b-403a-ffef-b0a0-4a0b6d92bec8@gmx.at> <87turpvxv0.fsf@gnus.org> <87turnh6u8.fsf@gnus.org> <87im83cn02.fsf@gnus.org> <568151d0-c8fd-1643-56a7-87ff36ce234d@gmx.at> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38689"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 45688@debbugs.gnu.org To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jan 19 04:27:09 2021 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 1l1hfh-0009um-Gy for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 19 Jan 2021 04:27:09 +0100 Original-Received: from localhost ([::1]:41870 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l1hfg-0005Ih-JK for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 18 Jan 2021 22:27:08 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58342) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l1hfa-0005IZ-EL for bug-gnu-emacs@gnu.org; Mon, 18 Jan 2021 22:27:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:37416) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l1hfa-0008R6-7E for bug-gnu-emacs@gnu.org; Mon, 18 Jan 2021 22:27:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1l1hfa-0003NC-3W for bug-gnu-emacs@gnu.org; Mon, 18 Jan 2021 22:27:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 19 Jan 2021 03:27:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45688 X-GNU-PR-Package: emacs Original-Received: via spool by 45688-submit@debbugs.gnu.org id=B45688.161102681512952 (code B ref 45688); Tue, 19 Jan 2021 03:27:02 +0000 Original-Received: (at 45688) by debbugs.gnu.org; 19 Jan 2021 03:26:55 +0000 Original-Received: from localhost ([127.0.0.1]:48962 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l1hfT-0003Mq-55 for submit@debbugs.gnu.org; Mon, 18 Jan 2021 22:26:55 -0500 Original-Received: from quimby.gnus.org ([95.216.78.240]:53538) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l1hfR-0003Mb-Ad for 45688@debbugs.gnu.org; Mon, 18 Jan 2021 22:26:53 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID :In-Reply-To:Date:References:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=6e/kLsIysTNOfyyjegsLInYcG4a0re7ykh/DwKI/tJU=; b=ijpEvElDj4DemoQ/Ra0Qb5LY2n 6+Eu32OlRgJtpmMQSTKL/mLffR2zFpGc/YOoZIFJ/80109URuJW8OD6AIkMQHpDtymruIi1xrL2RE hXMzRDY0GC1BLK1SAS+O0XSK8kUloxNnRz8eh6vPJVWQJs8RuNWJEPNdgBJavu3Fvjtg=; Original-Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l1hfH-0002qF-N1; Tue, 19 Jan 2021 04:26:47 +0100 X-Now-Playing: Ultra =?UTF-8?Q?Nat=C3=A9's?= _Blue Notes in the Basement_: "Funny (How Things Change)" In-Reply-To: <568151d0-c8fd-1643-56a7-87ff36ce234d@gmx.at> (martin rudalics's message of "Tue, 12 Jan 2021 10:06:45 +0100") 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:198113 Archived-At: martin rudalics writes: > 'display-buffer' still lives in the paradigm of <=3D 2 windows frames set > up in the past century and probably still the only reasonable one for > TTY frames. For that it supports things like 'even-window-heights' and > a 'split-height-threshold' of 80 with its "If, however, a window is the > only window on its frame, or all the other ones are dedicated, > =E2=80=98split-window-sensibly=E2=80=99 may split it vertically disregard= ing the value > of this variable." exception. Hence a first step to get your rampages > produce more reasonable results might be to ask whether that paradigm is > still a valid one. Well, it's certainly the most common one, but having more than two windows in a frame isn't unheard of, either. > If we don't want to do that, we can try to do some cosmetics in the size > restoring mechanism. Basically, that mechanism is used when you display > a temporary buffer in a two windows layout and you have > 'temp-buffer-resize-mode' enabled. Suppose with emacs -Q you enable > that mode and type C-h f push RET and then C-x 4 f to find some file. > This will re-enlarge the window used for showing the 'push' help to its > prior size so you get what you intend for showing that file. I think that makes sense... if you have that mode enabled. But if you're not asking Emacs to resize windows in this way, then having `display-buffer' resizing windows is somewhat confusing. > If we want 'display-buffer-use-some-window' to not do such size > restorations, we can just add a 'do-no-restore-size' alist entry and an > appropriate check like > > (when (and (not (cdr (assq 'do-no-restore-size alist))) > (listp quad) > (integerp (nth 3 quad)) > (> (nth 3 quad) (window-total-height window))) > > 'display-buffer-use-least-recent-window' (and/or the application/user) > could then set that entry at their like. Makes sense. >> In related news, get-lru-window doesn't seem to work reliably? I don't >> have a reproducer for that, either, but it seems to happen if I have a >> three window frame, and I call: >> >> (setq lru (get-lru-window (selected-frame) nil t)) >> (window-bump-use-time lru) >> (get-lru-window (selected-frame) nil t) >> >> will then return the same window as `lru'... > > How do you "call"? I suppose there's no chance to make another window > but the selected one the mru one. We would have to look into the inner > workings of that "call". eval the expressions. --=20 (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no