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.devel Subject: Re: master 18b680cfd1: Fix bug#52467 by adding a new custom variable 'display-comint-buffer-action' Date: Tue, 11 Jan 2022 20:15:24 +0200 Organization: LINKOV.NET Message-ID: <865yqqm94z.fsf@mail.linkov.net> References: <164073060906.21430.4993248796177370312@vcs2.savannah.gnu.org> <871r1v8nhf.fsf@gnus.org> <83ilv7jqm7.fsf@gnu.org> <6a9cd581-1630-4a95-62c4-419603561072@gmx.at> <3499cedf-b170-3045-873d-d45d2972ae13@gmx.at> <0f492ac4-4167-5448-2c74-a5f67950eae4@yandex.ru> <2de2323b-6d34-9263-776b-dbeff036f8f4@gmx.at> <87zgog68ni.fsf@gnus.org> <8dfc6f22-d331-e7c1-b536-2d374197528f@gmx.at> <86v8z26o15.fsf@mail.linkov.net> <9d5f512f-dd10-fb6b-2fe7-db24ed92f7c8@gmx.at> <86y23xuv8g.fsf@mail.linkov.net> <867dbgtuls.fsf@mail.linkov.net> <7402a9b1-91cf-a14e-32dc-e9a0cd27dd82@gmx.at> <86lezs4pmt.fsf@mail.linkov.net> <8635lup4tf.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30265"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu) Cc: sds@gnu.org, emacs-devel@gnu.org To: martin rudalics Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Jan 11 19:17:59 2022 Return-path: Envelope-to: ged-emacs-devel@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 1n7LiZ-0007j6-S0 for ged-emacs-devel@m.gmane-mx.org; Tue, 11 Jan 2022 19:17:59 +0100 Original-Received: from localhost ([::1]:45570 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n7LiY-0000SV-Ph for ged-emacs-devel@m.gmane-mx.org; Tue, 11 Jan 2022 13:17:58 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:52082) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n7LhD-0008A5-8L for emacs-devel@gnu.org; Tue, 11 Jan 2022 13:16:38 -0500 Original-Received: from [2001:4b98:dc4:8::230] (port=59575 helo=relay10.mail.gandi.net) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n7Lh3-0001lR-C8; Tue, 11 Jan 2022 13:16:34 -0500 Original-Received: (Authenticated sender: juri@linkov.net) by relay10.mail.gandi.net (Postfix) with ESMTPSA id B3761240004; Tue, 11 Jan 2022 18:16:17 +0000 (UTC) In-Reply-To: (martin rudalics's message of "Tue, 11 Jan 2022 19:02:05 +0100") X-Host-Lookup-Failed: Reverse DNS lookup failed for 2001:4b98:dc4:8::230 (failed) Received-SPF: pass client-ip=2001:4b98:dc4:8::230; envelope-from=juri@linkov.net; helo=relay10.mail.gandi.net X-Spam_score_int: -10 X-Spam_score: -1.1 X-Spam_bar: - X-Spam_report: (-1.1 / 5.0 requ) BAYES_00=-1.9, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:284625 Archived-At: >>> Note that a 'pop-to-buffer' call can add an arbitrary element like a >>> label to the action alist and 'display-buffer-alist' can, via a >>> function, interpret that label in any which way. So we do not have to >>> add anything new to make such things work. The important aspects are >>> rather discoverability and ease of documentation. >> >> Indeed, this would be nice to have: >> >> (pop-to-buffer "*shell*" '(display-buffer-reuse-or-same-window . >> ((label . *shell*)))) > > The question is who we think should take care of this: > 'display-buffer-assq-regexp' in association with 'display-buffer-alist'? > Or just a function specified via 'display-buffer-alist'? The latter can > be already done now with some documentation support maybe. The latter, that already can be used. Only one convenience change could be added to allow symbols in conditions: (add-to-list 'display-buffer-alist '((*comint* display-buffer-reuse-or-same-window (nil)))) > The former also requires a few code changes and a decision how to > handle > > (pop-to-buffer "*shell*" '(display-buffer-reuse-or-same-window > . ((label . *shell*) (label . *comint*)))) Maybe then allow a list: ((label . '(*shell* *comint*)))