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: Thu, 30 Dec 2021 18:14:14 +0100 Message-ID: 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> <868rw2ulzs.fsf@mail.linkov.net> 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="27233"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , sdsg@amazon.com, Lars Ingebrigtsen , emacs-devel@gnu.org To: Juri Linkov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Dec 30 18:16:51 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 1n2z2o-0006xc-HY for ged-emacs-devel@m.gmane-mx.org; Thu, 30 Dec 2021 18:16:50 +0100 Original-Received: from localhost ([::1]:45508 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n2z2n-0004Nj-Cj for ged-emacs-devel@m.gmane-mx.org; Thu, 30 Dec 2021 12:16:49 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:58048) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n2z0Q-0002rN-OL for emacs-devel@gnu.org; Thu, 30 Dec 2021 12:14:22 -0500 Original-Received: from mout.gmx.net ([212.227.15.18]:50113) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n2z0O-0005M9-SI; Thu, 30 Dec 2021 12:14:22 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1640884455; bh=4qc091V2mtwpKujaONIgijKY6Qntqa+VsCn3iQJes5U=; h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To; b=ZVAtv6u9kBF7+CuQjCYVRwmADeFa9v5/tvezibDgmdKVychFUJr20T+RY4/unPbvV MeKPT03k1yIcbNYciEHeFBxe8v5FezEDSYiI4NlISrXSQVoKcA28vSlxDzogmAlBk/ MoFe/KZPNFX1Nttei9krqBltYoIS9Meefdfkt6Qo= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from [192.168.1.101] ([213.142.97.158]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1Mlf4S-1mcxqG3RgY-00igvl; Thu, 30 Dec 2021 18:14:14 +0100 In-Reply-To: <868rw2ulzs.fsf@mail.linkov.net> Content-Language: en-US X-Provags-ID: V03:K1:DCk2BewpiXreGjAJR5KpYqud0DhhLYvh9HfDYMxDqC/VRo8sXjL yilcwdcEQBlkIoejfmEpe7PVw3Co/JncrC85YD7BtBJIkc8XaCtLC0RkBUG+IznikHysUnV CPIC5hMA2MfpIZ94RV5oaGx/lz3FTWZan0hEuMdeuIDKp6nhJ2vmHZ2pYd5DK9XrqU4RXSA LWghbOKe1IgNn9XySYIUQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:9ujKQAj0454=:MlAnLnvLOjSQ+Qev4xtILN iCU3c1oOo73gwMgEARhjovVp9Kses7ssrnQcncRJQUJLfq7wJrgM+MyKa+SyGNIYi/NEaW7H/ DMeJjK6kj9VDFwe9f72lu/z5FZt5S1ykVLwEPRThxG/fcukOk7VieircdN+VjHVn7z7HYlOl7 i9Jeea8HLB7mf+E6S2n8/0LNpaKJsJ9Clhz0qa9u5Y5BRqaDx9c2bRzbhVoaY6Kl+Wl/Mf6Q8 NbE/LI1pl0qlvRJ3iPWkvWrSaZtzbGt04Em0VjAKFAwE1Ff/rfuSouDwcPxm8ccNVAE7uv2SN 9hTwIJfTCkGN/e2z1TDq0fgHccMEl/3+UtW4MP1m/+ltAteIygUfAUuXZDbkh22fK18kLINRI pU7VBbZZRabOROPWmqVr4F1dZZCENdt87ZrGa/58nU6bL3y1SkHo+leIPdyzPMO4+WjjxOpGU JLOxEKCUE1fSNQV5ykSaGXu5XvtutEF6vDdT9elPmalxaM9R2t5DrKAWgGbvDh1KeKVQUkMmw rCes7wWUrlx9JHHHKU2O3rdkIY32W45p0Xu7tP7MJ9aq3UxjfMr2k8UFaJzoZh7RdX80cha6+ oRQZOkHKPdcwXbxVFU9mZbyjV5W/YH0+0r1ufxUGf6OjsRFggHSFrJONMxe3Ri4jBmQDTc5YT Nf7KG8V4DoPrf8XvX8p0OrroS3AJ9PlevGHyF2P3gT+c0gq/OM0MsfXBJ+PROrjQOS34hwcYb iKKVG5B7VAVcyNAM1E4iD10J5tm5Bg+WSmM2rgez/bp6R4nYQU/+KYQuCYVPRJmknhTyl4Ag Received-SPF: pass client-ip=212.227.15.18; envelope-from=rudalics@gmx.at; helo=mout.gmx.net X-Spam_score_int: -6 X-Spam_score: -0.7 X-Spam_bar: / X-Spam_report: (-0.7 / 5.0 requ) DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, 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:283670 Archived-At: > Some commands pop their windows in unexpected places anyway, > so often have to resort to typing a same-window-prefix key > before running such commands :-) > >> The attached diff should illustrate what I mean here. >> [...] >> +(defvar display-buffer--reuse-or-same-window-action >> + '((display-buffer-reuse-window >> + display-buffer-same-window) >> + (inhibit-same-window . nil)) > > Shouldn't the first item be display-buffer--maybe-same-window > before display-buffer-reuse-window? This is what is used by default > in display-buffer-fallback-action, but it has a comment with a question, > so probably it's really redundant: > > (defconst display-buffer-fallback-action > '((display-buffer--maybe-same-window ;FIXME: why isn't this redundant? > display-buffer-reuse-window 'display-buffer--maybe-same-window' is here for compatibility reasons with the 'same-window-buffer-names/-regexps' options and can be used only in an "ored" fashion as in 'display-buffer--maybe-at-bottom' or 'display-buffer-fallback-action'. Otherwise, it would defeat 'display-buffer-alist' because it uses the same window only if that has been advocated by 'same-window-p' which ignores 'display-buffer-alist'. It's not redundant as long as we want to maintain compatibility for those options. > Grep counted 100 occurrences of pop-to-buffer-same-window in the source tree, > but I guess only shell commands could use pop-to-buffer-reuse-or-same-window? It can be used as a substitute for 'pop-to-buffer' wherever we decide that consistency should prevail over long-standing behavior. I have been missing the present and the preceding thread but I think we should revert the behavior for Emacs 28 and use 'pop-to-buffer' there. Sam's protest in this respect was justified - we cannot simply tell people that they should customize 'display-buffer-alist' in order to get back some long-standing behavior. That's not our style. Now 'pop-to-buffer-reuse-or-same-window' is still no 100% substitute for 'pop-to-buffer' but we can try it because it handles Sam's main argument against 'pop-to-buffer-same-window' - that the same buffer appears twice on the same frame. Whether that suffices to fix all regressions in this context should probably be answered in Emacs 29. martin