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: Sun, 10 Dec 2023 11:28:27 -0500
Message-ID: <jwv5y16kp05.fsf-monnier+emacs@gnu.org>
References: <jwv34x4m50o.fsf@iro.umontreal.ca>
 <cbc6a073-2718-7809-c85e-cf338341c712@gmx.at>
 <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>
 <SJ0PR10MB5488ECBC85AC127234347F1FF389A@SJ0PR10MB5488.namprd10.prod.outlook.com>
 <83edfuwqai.fsf@gnu.org>
Reply-To: Stefan Monnier <monnier@iro.umontreal.ca>
Mime-Version: 1.0
Content-Type: text/plain
Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214";
	logging-data="29049"; mail-complaints-to="usenet@ciao.gmane.io"
User-Agent: Gnus/5.13 (Gnus v5.13)
Cc: rudalics@gmx.at, Drew Adams <drew.adams@oracle.com>, 67249@debbugs.gnu.org
To: Eli Zaretskii <eliz@gnu.org>
Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Dec 10 17:29:06 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 1rCMfy-0007Kt-4z
	for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 10 Dec 2023 17:29:06 +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 1rCMfi-0004yo-Hi; Sun, 10 Dec 2023 11:28:50 -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 1rCMfg-0004x4-Py
 for bug-gnu-emacs@gnu.org; Sun, 10 Dec 2023 11:28:48 -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 1rCMfg-000054-87
 for bug-gnu-emacs@gnu.org; Sun, 10 Dec 2023 11:28:48 -0500
Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2)
 (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1rCMfu-00069E-02
 for bug-gnu-emacs@gnu.org; Sun, 10 Dec 2023 11:29: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: Sun, 10 Dec 2023 16:29:01 +0000
Resent-Message-ID: <handler.67249.B67249.170222573323618@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.170222573323618
 (code B ref 67249); Sun, 10 Dec 2023 16:29:01 +0000
Original-Received: (at 67249) by debbugs.gnu.org; 10 Dec 2023 16:28:53 +0000
Original-Received: from localhost ([127.0.0.1]:51692 helo=debbugs.gnu.org)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <debbugs-submit-bounces@debbugs.gnu.org>)
 id 1rCMfl-00068s-DD
 for submit@debbugs.gnu.org; Sun, 10 Dec 2023 11:28:53 -0500
Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:10697)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <monnier@iro.umontreal.ca>) id 1rCMfg-00068a-Tt
 for 67249@debbugs.gnu.org; Sun, 10 Dec 2023 11:28:52 -0500
Original-Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1])
 by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 45C0B80663;
 Sun, 10 Dec 2023 11:28:29 -0500 (EST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
 s=mail; t=1702225708;
 bh=4muuZth4PsyrGht6wI3pybJ25qfH0XaFUxUloHuqxLo=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
 b=Zf2yxz/2vQiBgedbjcjduU7w3Bs3dA9hBfj2j+nWO37ayheCvCjzYOg0Lc3q5GF9o
 gISYBsfllVaP8L/DYtEY17z4x3/3mF28ngbo+ardEYKvf7J+Uqfs5j5LTOwkoqs+La
 YK/FXkUKOOzH1NsSO9o8VICbp1z2dNk4woNe+ss03gFEjiAlVm5XagkLw8LJsi27IU
 HEBpZYYnkH8XIiZLqFIyT0SRSrqJMIp5LwSFzcrZNAbEspZw7zfB9S8+h4WJaVdWTB
 gyu+HvQuFgUBm9irkO370YUV6R5SEHqrdO0aQWbmJnJWNUHk5RCU00cCvw+NKh/p+O
 AL1taBLodRC6w==
Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
 by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 58ADB801B3;
 Sun, 10 Dec 2023 11:28:28 -0500 (EST)
Original-Received: from pastel (unknown [45.72.200.104])
 by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 2A61F12022A;
 Sun, 10 Dec 2023 11:28:28 -0500 (EST)
In-Reply-To: <83edfuwqai.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 10 Dec
 2023 08:00:05 +0200")
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:275933
Archived-At: <http://permalink.gmane.org/gmane.emacs.bugs/275933>

> There's nothing wrong with having parameters and user options by the
> same name that affect the same functionality, but indeed usually the
> user option overrides the parameter, not the other way around.  See,
> for example, the cursor-type option and frame parameter.

Usually the rule we follow is to obey the most specific setting.
In your example, we obey the (potentially buffer-local) variable in
preference to the frame-local parameter.

In my patch the choice is between the global variable (I've never seen
it set buffer-locally and I don't think the code would handle it "right"
if set buffer-locally) and the buffer/operation-specific parameter.

Also, contrary to the current situation where code let-binds the
variable to "impose" its choice over that of the user (which is hard to
undo/override), when code sets it via the new alist entry the user gets
a chance to override this override via `display-buffer-alist`.

The `display-buffer` action system is complex, but it is designed
specifically so as to allow the user to stay in control.


        Stefan