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" <bug-gnu-emacs@gnu.org>
Newsgroups: gmane.emacs.bugs
Subject: bug#67249: 30.0.50; `same-frame` equivalent for `display-buffer-alist`
Date: Mon, 11 Dec 2023 17:14:09 -0500
Message-ID: <jwvr0jsfl93.fsf-monnier+emacs@gnu.org>
References: <jwv34x4m50o.fsf@iro.umontreal.ca>
 <jwvv89xesho.fsf-monnier+emacs@gnu.org>
 <69e6899b-9e93-9a97-a8bc-4ce9a9f0ae4c@gmx.at>
 <jwvwmucd0mq.fsf-monnier+emacs@gnu.org>
 <69387717-1eaa-6019-0000-4c95c61e1bc3@gmx.at>
 <jwvwmubrkx7.fsf-monnier+emacs@gnu.org>
 <1f026837-af56-435f-9d4e-048a18af07eb@gmx.at>
 <jwv8r6pssbu.fsf-monnier+emacs@gnu.org>
 <a3b664a2-bb53-2f84-edb1-ab4d9d3567bd@gmx.at>
 <jwvlean7ulh.fsf-monnier+emacs@gnu.org>
 <488b181f-c74e-d97b-b168-a602158c3e7b@gmx.at>
 <jwv8r6n6z8t.fsf-monnier+emacs@gnu.org>
 <jwv8r6njf5k.fsf-monnier+emacs@gnu.org>
 <47d97021-75ea-cfc7-d439-cc38bc1044f4@gmx.at>
 <jwvwmu529iy.fsf-monnier+emacs@gnu.org>
 <jwvjzpvglal.fsf-monnier+emacs@gnu.org>
 <52b5fec2-510f-2fcd-c67c-2da18c91ab22@gmx.at>
 <jwv1qbvm2o1.fsf-monnier+emacs@gnu.org> <83fs0awqm7.fsf@gnu.org>
 <jwvbkayj7x8.fsf-monnier+emacs@gnu.org>
 <1591d512-320b-4010-b43d-e38889bfa497@gmx.at>
Reply-To: Stefan Monnier <monnier@iro.umontreal.ca>
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="30310"; mail-complaints-to="usenet@ciao.gmane.io"
User-Agent: Gnus/5.13 (Gnus v5.13)
Cc: Eli Zaretskii <eliz@gnu.org>, 67249@debbugs.gnu.org
To: martin rudalics <rudalics@gmx.at>
Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Dec 11 23:15:03 2023
Return-path: <bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org>
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 <bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org>)
	id 1rCoYI-0007di-D4
	for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 11 Dec 2023 23:15:03 +0100
Original-Received: from localhost ([::1] helo=lists1p.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.90_1)
	(envelope-from <bug-gnu-emacs-bounces@gnu.org>)
	id 1rCoY5-0007I1-D4; Mon, 11 Dec 2023 17:14:49 -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 <Debian-debbugs@debbugs.gnu.org>)
 id 1rCoY3-0007Hl-BC
 for bug-gnu-emacs@gnu.org; Mon, 11 Dec 2023 17:14:47 -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 <Debian-debbugs@debbugs.gnu.org>)
 id 1rCoY3-0007Gm-3W
 for bug-gnu-emacs@gnu.org; Mon, 11 Dec 2023 17:14:47 -0500
Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2)
 (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1rCoYI-0004TY-2Y
 for bug-gnu-emacs@gnu.org; Mon, 11 Dec 2023 17:15:02 -0500
X-Loop: help-debbugs@gnu.org
Resent-From: Stefan Monnier <monnier@iro.umontreal.ca>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@gnu.org
Resent-Date: Mon, 11 Dec 2023 22:15:02 +0000
Resent-Message-ID: <handler.67249.B67249.170233287517153@debbugs.gnu.org>
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.170233287517153
 (code B ref 67249); Mon, 11 Dec 2023 22:15:02 +0000
Original-Received: (at 67249) by debbugs.gnu.org; 11 Dec 2023 22:14:35 +0000
Original-Received: from localhost ([127.0.0.1]:54865 helo=debbugs.gnu.org)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <debbugs-submit-bounces@debbugs.gnu.org>)
 id 1rCoXq-0004Sb-Iw
 for submit@debbugs.gnu.org; Mon, 11 Dec 2023 17:14:34 -0500
Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:30142)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <monnier@iro.umontreal.ca>) id 1rCoXo-0004SN-Sz
 for 67249@debbugs.gnu.org; Mon, 11 Dec 2023 17:14:33 -0500
Original-Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1])
 by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id C91D6807A4;
 Mon, 11 Dec 2023 17:14:11 -0500 (EST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
 s=mail; t=1702332850;
 bh=nQpNQjN0lb9TTyTAT89C+2a+CluXueDLIXUo4/cJf6U=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
 b=M+Q6RUZMewx6f2UWEFTLuaSjuSf4z2ZiS+rPzUEGTJiq3K6mTL0dXxw3zFqVX026c
 MQNhGU4ZQiXn6R9qz/gIFyk19do8/1KnIr5JMa70qY30vbILkbU7hBHTzuqgdv0bYX
 fzuXtDgiDDzN5uLiRSDNrCzsvZh5MnpQqngs7u6a71YHUrkn2DE1P0Zz06T8cVEc1g
 gyH9KlBSs0laS/2LbSu6Gwa9rWz8g5TA8IZFUrNcU6UWC/O7pdaMmz5Rj2SClOdSi5
 4xZWWTpbtZnJ0tjScPIzA17k7rhFbTAThaumEjMBmvwwnxfr30sppkFD26GvHgvwa0
 Q8ltesXAyO/MA==
Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
 by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id B37D180250;
 Mon, 11 Dec 2023 17:14:10 -0500 (EST)
Original-Received: from pastel (unknown [45.72.203.88])
 by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 8915A12075C;
 Mon, 11 Dec 2023 17:14:10 -0500 (EST)
In-Reply-To: <1591d512-320b-4010-b43d-e38889bfa497@gmx.at> (martin rudalics's
 message of "Mon, 11 Dec 2023 18:13:51 +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" <bug-gnu-emacs.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-gnu-emacs>,
 <mailto:bug-gnu-emacs-request@gnu.org?subject=unsubscribe>
List-Archive: <https://lists.gnu.org/archive/html/bug-gnu-emacs>
List-Post: <mailto:bug-gnu-emacs@gnu.org>
List-Help: <mailto:bug-gnu-emacs-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-gnu-emacs>,
 <mailto:bug-gnu-emacs-request@gnu.org?subject=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:276007
Archived-At: <http://permalink.gmane.org/gmane.emacs.bugs/276007>

>> +@vindex pop-up-frames{, a buffer display action alist entry}
>> +@item pop-up-frames
>> +This value controls whether @code{display-buffer} may display buffers
> I don't think that "value" is correct here.

I changed "This value" to "The value", since that's the term used for
the other alist entries in this section.

>> +by making new frames.  It has the same meaning as the
>
> Also you probably might want to recommend using an alist entry here:
>
> =E2=80=98pop-up-frames=E2=80=99
>      Instead of customizing this variable to =E2=80=98t=E2=80=99, customi=
ze
>      =E2=80=98display-buffer-base-action=E2=80=99, for example, as follow=
s:
>
>           (setopt
>            display-buffer-base-action
>            '((display-buffer-reuse-window display-buffer-pop-up-frame)
>              (reusable-frames . 0)))

Indeed, thanks,


        Stefan


diff --git a/doc/lispref/windows.texi b/doc/lispref/windows.texi
index 22c1b307252..48893e22511 100644
--- a/doc/lispref/windows.texi
+++ b/doc/lispref/windows.texi
@@ -3268,6 +3268,15 @@ Buffer Display Action Alists
 if one is created.  @code{display-buffer-pop-up-frame} is its one and
 only addressee.
=20
+@vindex pop-up-frames{, a buffer display action alist entry}
+@item pop-up-frames
+The value controls whether @code{display-buffer} may display buffers
+by making new frames.  It has the same meaning as the
+@code{pop-up-frames} variable and takes precedence over it when present.
+Its main intended purpose is to override a non-nil value of the
+variable for particular buffers which the user prefers to keep
+in the selected frame.
+
 @vindex parent-frame@r{, a buffer display action alist entry}
 @item parent-frame
 The value specifies the parent frame to be used when the buffer is
@@ -3441,6 +3450,9 @@ Choosing Window Options
 looking for a window already displaying @var{buffer-or-name}, it can
 search any visible or iconified frame, not just the selected frame.
=20
+An entry by the same name in @code{display-buffer}'s @var{alist}
+takes precedence over the variable.
+
 This variable is provided mainly for backward compatibility.  It is
 obeyed by @code{display-buffer} via a special mechanism in
 @code{display-buffer-fallback-action}, which calls the action function
@@ -3512,15 +3524,12 @@ Choosing Window Options
=20
 @item pop-up-frames
 @vindex pop-up-frames@r{, replacement for}
-Instead of customizing this variable to @code{t}, customize
+Instead of customizing this variable to @code{t}, you can customize
 @code{display-buffer-base-action}, for example, as follows:
=20
 @example
 @group
-(setopt
- display-buffer-base-action
- '((display-buffer-reuse-window display-buffer-pop-up-frame)
-   (reusable-frames . 0)))
+(setopt display-buffer-base-action '(nil (pop-up-frames . t)))
 @end group
 @end example
=20