From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#69983: Use category for display-buffer-alist Date: Thu, 04 Apr 2024 09:16:17 +0300 Organization: LINKOV.NET Message-ID: <86wmpdu0fa.fsf@mail.linkov.net> References: <86h6gv7e0z.fsf@mail.linkov.net> <3e7b8e64-0a5f-4888-a443-9c69a5fffd98@gmx.at> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27265"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) Cc: 69983@debbugs.gnu.org To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Apr 04 08:20:32 2024 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 1rsGSd-0006vL-Nb for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 04 Apr 2024 08:20:31 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rsGS8-0000Fu-6H; Thu, 04 Apr 2024 02:20:00 -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 1rsGS5-0000Eo-Uf for bug-gnu-emacs@gnu.org; Thu, 04 Apr 2024 02:19:57 -0400 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 1rsGS5-0006Qb-L2 for bug-gnu-emacs@gnu.org; Thu, 04 Apr 2024 02:19:57 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rsGSA-0004lY-Dq for bug-gnu-emacs@gnu.org; Thu, 04 Apr 2024 02:20:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 04 Apr 2024 06:20:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 69983 X-GNU-PR-Package: emacs Original-Received: via spool by 69983-submit@debbugs.gnu.org id=B69983.171221156218070 (code B ref 69983); Thu, 04 Apr 2024 06:20:02 +0000 Original-Received: (at 69983) by debbugs.gnu.org; 4 Apr 2024 06:19:22 +0000 Original-Received: from localhost ([127.0.0.1]:60385 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rsGRV-0004hE-CM for submit@debbugs.gnu.org; Thu, 04 Apr 2024 02:19:21 -0400 Original-Received: from relay7-d.mail.gandi.net ([2001:4b98:dc4:8::227]:37345) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rsGRT-0004gK-2F for 69983@debbugs.gnu.org; Thu, 04 Apr 2024 02:19:20 -0400 Original-Received: by mail.gandi.net (Postfix) with ESMTPSA id 9D50B20004; Thu, 4 Apr 2024 06:19:06 +0000 (UTC) In-Reply-To: <3e7b8e64-0a5f-4888-a443-9c69a5fffd98@gmx.at> (martin rudalics's message of "Mon, 25 Mar 2024 10:41:33 +0100") X-GND-Sasl: juri@linkov.net 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:282622 Archived-At: >> 'display-comint-buffer-action' and 'display-tex-shell-buffer-action' >> are out of place in window.el, and they are redundant per se. >> >> What these variables are trying to achieve is already possible >> to do by using a 'category' in 'display-buffer-alist'. >> >> Or we need to keep backward-compatibility? Then the first step >> to deprecate there variables would be something like this: > > Please proceed as carefully as possible, here might be dragons. Ok, here is a complete patch: diff --git a/lisp/window.el b/lisp/window.el index 3867f6fa6ef..29e7310958b 100644 --- a/lisp/window.el +++ b/lisp/window.el @@ -8923,7 +8923,8 @@ pop-to-buffer-same-window another window." (pop-to-buffer buffer display-buffer--same-window-action norecord)) -(defcustom display-comint-buffer-action display-buffer--same-window-action +(defcustom display-comint-buffer-action + (append display-buffer--same-window-action '((category . comint))) "`display-buffer' action for displaying comint buffers." :type display-buffer--action-custom-type :risky t @@ -8931,8 +8932,14 @@ display-comint-buffer-action :group 'windows :group 'comint) +(make-obsolete-variable + 'display-comint-buffer-action + "use a `(category . comint)' condition in `display-buffer-alist'." + "30.1") + (defcustom display-tex-shell-buffer-action '(display-buffer-in-previous-window - (inhibit-same-window . t)) + (inhibit-same-window . t) + (category . tex-shell)) "`display-buffer' action for displaying TeX shell buffers." :type display-buffer--action-custom-type :risky t @@ -8940,6 +8947,11 @@ display-tex-shell-buffer-action :group 'windows :group 'tex-run) +(make-obsolete-variable + 'display-tex-shell-buffer-action + "use a `(category . tex-shell)' condition in `display-buffer-alist'." + "30.1") + (defun read-buffer-to-switch (prompt) "Read the name of a buffer to switch to, prompting with PROMPT. Return the name of the buffer as a string.