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: Sun, 02 Jan 2022 19:43:10 +0200 Organization: LINKOV.NET Message-ID: <86v8z26o15.fsf@mail.linkov.net> References: <164073060906.21430.4993248796177370312@vcs2.savannah.gnu.org> <20211228223009.6D0BAC002EE@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> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30423"; 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: Lars Ingebrigtsen , Dmitry Gutov , emacs-devel@gnu.org, Eli Zaretskii , sdsg@amazon.com To: martin rudalics Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Jan 02 18:51:50 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 1n451K-0007kZ-8M for ged-emacs-devel@m.gmane-mx.org; Sun, 02 Jan 2022 18:51:50 +0100 Original-Received: from localhost ([::1]:51184 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n451I-0006yJ-Oc for ged-emacs-devel@m.gmane-mx.org; Sun, 02 Jan 2022 12:51:48 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:45504) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n44zx-00060M-HF for emacs-devel@gnu.org; Sun, 02 Jan 2022 12:50:26 -0500 Original-Received: from relay1-d.mail.gandi.net ([217.70.183.193]:43159) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n44zs-0005kI-5z; Sun, 02 Jan 2022 12:50:24 -0500 Original-Received: (Authenticated sender: juri@linkov.net) by relay1-d.mail.gandi.net (Postfix) with ESMTPSA id 9601A24000C; Sun, 2 Jan 2022 17:50:09 +0000 (UTC) In-Reply-To: <8dfc6f22-d331-e7c1-b536-2d374197528f@gmx.at> (martin rudalics's message of "Fri, 31 Dec 2021 19:41:09 +0100") Received-SPF: pass client-ip=217.70.183.193; envelope-from=juri@linkov.net; helo=relay1-d.mail.gandi.net X-Spam_score_int: -6 X-Spam_score: -0.7 X-Spam_bar: / X-Spam_report: (-0.7 / 5.0 requ) RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable 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:283938 Archived-At: > I'm not sure whether we should want to "make these commands behave the > same". But if we do, we have to provide some _simple_ knob to let users > get the old behavior without having to think about how to match names of > buffers they possibly never cared about with the help of a regular > expression. This is how we can make customization simpler, helping to get the old behavior back for a set of commands. Currently there are 11 comint commands that have invocations like: (pop-to-buffer "*inferior-lisp*" display-comint-buffer-action) (pop-to-buffer "*scheme*" display-comint-buffer-action) ... To change their behavior at once the user needs to construct a complex regexp that matches all used comint buffer names, "\\*inferior-lisp\\*\\|\\*scheme\\*\\|..." This is completely unmanageable. Instead of this, all calls could add a special tag: (pop-to-buffer "*inferior-lisp*" '(nil (comint . t))) Then a condition predicate could check for this tag: (defun display-buffer-comint (buffer-name action) (assq 'comint action)) and the user can customize all comint commands with: (add-to-list 'display-buffer-alist '(display-buffer-comint (display-buffer-same-window . ((reusable-frames . 0) (inhibit-same-window . nil)))))