From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#67249: 30.0.50; `same-frame` equivalent for `display-buffer-alist` Date: Tue, 21 Nov 2023 14:09:22 -0500 Message-ID: References: <159cd3c2-a0c4-63e2-ebb2-ce0f5f8c343e@gmx.at> <69e6899b-9e93-9a97-a8bc-4ce9a9f0ae4c@gmx.at> <69387717-1eaa-6019-0000-4c95c61e1bc3@gmx.at> Reply-To: Stefan Monnier 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="25726"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 67249@debbugs.gnu.org To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Nov 21 20:13:28 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 1r5WBb-0006TS-7O for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 21 Nov 2023 20:13:27 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r5WBQ-0005Dh-V6; Tue, 21 Nov 2023 14:13:17 -0500 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 1r5WBA-0004s9-31 for bug-gnu-emacs@gnu.org; Tue, 21 Nov 2023 14:13:01 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r5WB9-0004kH-RT for bug-gnu-emacs@gnu.org; Tue, 21 Nov 2023 14:12:59 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1r5WBC-0003ov-6M for bug-gnu-emacs@gnu.org; Tue, 21 Nov 2023 14:13:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 21 Nov 2023 19:13:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67249 X-GNU-PR-Package: emacs Original-Received: via spool by 67249-submit@debbugs.gnu.org id=B67249.170059393914627 (code B ref 67249); Tue, 21 Nov 2023 19:13:02 +0000 Original-Received: (at 67249) by debbugs.gnu.org; 21 Nov 2023 19:12:19 +0000 Original-Received: from localhost ([127.0.0.1]:57435 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r5WAU-0003nr-VC for submit@debbugs.gnu.org; Tue, 21 Nov 2023 14:12:19 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:19566) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r5WAS-0003nc-FH for 67249@debbugs.gnu.org; Tue, 21 Nov 2023 14:12:17 -0500 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id BA9751000AD; Tue, 21 Nov 2023 14:12:07 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1700593926; bh=aQCpZsYV1wvys4hnHKS3HeQkKPWEExihLnpBMk1ahI4=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=M22aio4ISsO/mgrM//mGhMPW+09BiGBddQBjL3h2tjp4voIPgRLhURMaKoe/elJ4A 19bT+fr+AO1cFjuSrU/Rr1I1dpIVgO7AdbPovvnvsu8gQx+A3bE8uvurug3ONM3OdD 7u9WpV2/SBUYN9dA1nJ+djUYmpQAHQBvfw4ZBT5U+38ocIlRxTudshO7A+gK37zWEy /gOPu1MB/thMMNXZffok6HcqbKr8MOHaaN3Gkuy+Ojd+RzYnHMBdUfhMD1iWkoIOVR +z9hUhTYX066dWP8UDsHW+KAi3jiA3RELwXaemYNm8xyiV4QIxwm7+Xs/D6XzXYKFe 28iWG2zuX6pZg== Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id C564A100043; Tue, 21 Nov 2023 14:12:06 -0500 (EST) Original-Received: from lechazo (lechon.iro.umontreal.ca [132.204.27.242]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id B10011202AA; Tue, 21 Nov 2023 14:12:06 -0500 (EST) In-Reply-To: <69387717-1eaa-6019-0000-4c95c61e1bc3@gmx.at> (martin rudalics's message of "Tue, 21 Nov 2023 18:14:38 +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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:274739 Archived-At: >>> So a (same-frame . t) entry would simply auto-translate to a pair of >>> (reusable-frames . nil) (lru-frames . nil) entries? >> >> [ Hmm... I'm curious how you interpreted what I wrote to reach >> that conclusion. ] >> No, I meant the opposite: the users who want to override >> `reusable-frames` and `lru-frames` need to add all three >> >> (same-frame . t) >> (reusable-frames . nil) >> (lru-frames . nil) > > Suppose an application calls =E2=80=98display-buffer=E2=80=99 with a non-= nil > 'same-frame' alist entry. If we want an existing action function to > obey that entry and we do not want to rewrite that function, we could > have 'display-buffer' add a (reusable-frames . nil) (lru-frames . nil) > pair to the alist. We could, but we could also define the semantics of `same-frame` to have no effect on frame re-use (it would actually be closer to the current semantics). If so, it'd be best to find another name for it along the lines of "no-new-frame". >>> We could add a 'display-buffer--same-frame-action' variable. >> I don't really know what that suggestion means. >> The `--` suggests it'd be some internal detail of `window.el` whereas >> I thought we're discussing the externally visible API and semantics. > It could do what I meant above - translate 'same-frame' internally. What is "it"? `display-buffer--same-frame-action`? Without knowing where you'd use such a variable, it's hard for me to guess what you mean by that. >> I don't see why you think it'd require any change in existing code: the >> ones who set `same-frame` get what they ask for. > You already would change the existing 'display-buffer-pop-up-frame'. > If you think that change is sufficient, I will obviously stop thinking. I suspect it might be sufficient, but it would deserve a better name so users don't get the wrong impression that it will affect reuse on other frames. So you think the patch I sent is actually more-or-less acceptable (modulo documentation and finding a better name)? >> I'm not talking about `display-buffer` choosing a minibuffer-only frame. >> I'm saying that when the selected-frame is a minibuffer-only frame, it's= OK >> to ignore the `same-frame` request. > When the selected frame is a minibuffer-only frame, 'display-buffer' > usually tries to think of 'last-nonminibuffer-frame' as the selected > frame. So probably 'same-frame' should do the same. Sounds like this is compatible to my suggestion that it's OK to ignore `same-frame` when the selected frame is a minibuffer-only frame. > But all I can do is to hint at inconsistencies in your proposal. Not sure what's the inconsistency there. Stefan