From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.devel Subject: Re: master 18b680cfd1: Fix bug#52467 by adding a new custom variable 'display-comint-buffer-action' Date: Fri, 31 Dec 2021 20:40:20 +0100 Message-ID: <55692797-f030-e2c0-02c9-070974c4aedf@gmx.at> 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> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22950"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: sds@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Dec 31 20:41:28 2021 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 1n3NmK-0005ry-2f for ged-emacs-devel@m.gmane-mx.org; Fri, 31 Dec 2021 20:41:28 +0100 Original-Received: from localhost ([::1]:58728 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n3NmI-0002Ge-1a for ged-emacs-devel@m.gmane-mx.org; Fri, 31 Dec 2021 14:41:26 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:49310) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n3NlN-0001Tt-0a for emacs-devel@gnu.org; Fri, 31 Dec 2021 14:40:29 -0500 Original-Received: from mout.gmx.net ([212.227.17.20]:40533) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n3NlH-0008AW-PA; Fri, 31 Dec 2021 14:40:28 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1640979621; bh=QBHx8Oz4ZC/NnY2VpzA1ZrfjlqAa+186LzUbVy9q1BQ=; h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To; b=cMv0d3NvQwqKVBIq4bwSSV0hOHU4k4XURWfzNXtTYKVCsE5fFZ04k6DsfVq5PMsMI m3cwCt3JNtPVBl6AIkeeKOPcKbAeUAHgsjgP+pbaV7istEKRsILs8axt2nYQNI/OSS /MWmMHsndmiGDoWmea8F7jGbvxNdMUdSil6eREkQ= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from [192.168.1.102] ([46.125.249.79]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MI5QF-1nEflD48Pf-00F8SW; Fri, 31 Dec 2021 20:40:21 +0100 In-Reply-To: Content-Language: en-US X-Provags-ID: V03:K1:j607b+T+iv+vDZXzu78OTkR/6R4LbHolShXdet8rUxDTMEc+j38 gQL9P0a3V0bIDqG7kpUGNMDC6ruFcPAATHk0brvZ0AYverrHakP3ZxAj5bmU30AKc2rZNO6 e7016rhDvfqR2F96Oh+drG4T2kGUtV7xwcjojE3L/Zc9v1faQfzzTdv1wSDEmIqw59n9EuA gqESNbudMBtUH7Ej1lTaw== X-UI-Out-Filterresults: notjunk:1;V03:K0:i/LcZvk+zrY=:NgJpq1wu60rmO9re5IHc93 U+P3Tvm4g3DJHQCD3KVcfHDHnf85BA+teYtWCOyHuDzhk2HqJEU+E2NzXEAmOUb8RfS9Et0VT rXJGv21yCNRu3LiH+eL6jMPDmeRAKB3z1vdaiGUDhaQavS099o8qQ+irCUMSSDT69BoPK8fK1 aMKIRyIzA2ndtquqMwPmVhRy3cOND8Czf77bVykq4+bLar4wDAvNDxdols6hYKZP8zzniT6iL SQRKw2/Hd2WVEm6bRYHJOZO1b3CX/JS0s6lG7yu5s3hgKm4T4LhCH66lj0FqPlvAMdgt+5IxG FwF+Yi/Jk4Hwa4Tpk0rW8Ju8RhoS0K6sN1fRSCSBhxudR88vLHh1BM1Jvabr1meX9MzYxKDNc JA3VE0zh8ZMyaGmo7yWJSFjbYhOFpe9rJBEXFxyOH1PqACZb0+cAMK1KedkzajfY/rr6fB6J4 kNN95KaY7cV3erqyim1j6O54sVdvVwkmwZQ+fxmPyR2EOQ+kJ8jSx9HU2QlQO8xxFDG5zpINd j6lvA3B7H7L2UnYSue/qhOV7f84NuI39L2/m8GT23wuVCcDAJ5WbIfDLn5lMZH+XcrV9fs9t8 i9nmhD9VLjkbBQLSyc/0wVxS+8WCWuzFx5B+QGLYbTcl1AK2BeDFmCxSkZU0CNSxPPdqBGzV5 DZ2E5SaTEzK6cQY31GedfKKALyVswbg3+1FNCqMW5fEib4nNBzgQoy4c9bWKon4Ve88HP1zjx vD7AO2nd1fYzMfdpyGBpszNQcP8H6A3Elgyf2VQXw811Q+KKRygXvNOZ5Ttmr4NOE2os1yqL Received-SPF: pass client-ip=212.227.17.20; envelope-from=rudalics@gmx.at; helo=mout.gmx.net X-Spam_score_int: 0 X-Spam_score: 0.0 X-Spam_bar: / X-Spam_report: (0.0 / 5.0 requ) DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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:283766 Archived-At: >> That's an exaggeration. You can always work around this problem via >> 'display-buffer-alist'. > > Are you saying that by manipulating `display-buffer-alist' I can stop > `pop-to-buffer' from using the same window?! Yes. > How? (add-to-list 'display-buffer-alist '("\\*shell\\*" nil (inhibit-same-window . t))) (pop-to-buffer-same-window "*shell*") Have you ever read sections 29.15.5 and 29.15.6 of the Elisp manual? These contain numerous examples of how to add the 'inhibit-same-window' action alist entry to do precisely that. >> But we cannot simply convert everything that used >> 'switch-to-buffer' once (or still uses it) to use 'pop-to-buffer' >> instead. > > That's okay, we can leave `switch-to-buffer' alone. Then we have to leave 'pop-to-buffer-same-window' alone too. 'pop-to-buffer-same-window' is the customizable version of 'switch-to-buffer'. >> The greatest problem the 'display-buffer-alist' functionality had to >> deal with was to leave the default behavior unchanged while adding >> enough facilities so users could change the behavior to their like. > > IIUC, using `pop-to-buffer' for *shell* and adding something like > > (("*shell*" (display-buffer-reuse-window))) > > to `display-buffer-alist' is equivalent to using > `pop-to-buffer-same-window' on *shell*. There is no such equivalence. Think of 'pop-to-buffer' as a proposal. It's what the writer of an application considers the best choice for fulfilling its customers' needs. 'display-buffer-alist' is the user's answer for dealing with that proposal. >> Deciding is not sufficient. Users have to customize it and you should >> have now noticed by yourself that dealing with 'display-buffer-alist' is >> not entirely trivial. > > Understatement of the year. Every second specification I write fails initially. > This is why I want us to use it instead of `pop-to-buffer-*' - to give > users a good starting example to modify. We can add that to the manual - as soon as we think it's good enough. martin