From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Sam Steingold Newsgroups: gmane.emacs.devel Subject: Re: master 18b680cfd1: Fix bug#52467 by adding a new custom variable 'display-comint-buffer-action' Date: Mon, 03 Jan 2022 12:22:52 -0500 Organization: disorganization 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> <55692797-f030-e2c0-02c9-070974c4aedf@gmx.at> Reply-To: sds@gnu.org Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38098"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (darwin) To: emacs-devel@gnu.org Cancel-Lock: sha1:Il94PbnOTqng8FetED9+f+rrVC0= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Jan 03 18:24:06 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 1n4R41-0009gn-G8 for ged-emacs-devel@m.gmane-mx.org; Mon, 03 Jan 2022 18:24:05 +0100 Original-Received: from localhost ([::1]:40256 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n4R40-0000r1-9h for ged-emacs-devel@m.gmane-mx.org; Mon, 03 Jan 2022 12:24:04 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:35506) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n4R31-0000AA-Fk for emacs-devel@gnu.org; Mon, 03 Jan 2022 12:23:03 -0500 Original-Received: from ciao.gmane.io ([116.202.254.214]:34772) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n4R2z-0005P2-P6 for emacs-devel@gnu.org; Mon, 03 Jan 2022 12:23:03 -0500 Original-Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1n4R2v-00084U-Oj for emacs-devel@gnu.org; Mon, 03 Jan 2022 18:22:57 +0100 X-Injected-Via-Gmane: http://gmane.org/ X-Attribution: Sam X-Disclaimer: You should not expect anyone to agree with me. Received-SPF: pass client-ip=116.202.254.214; envelope-from=ged-emacs-devel@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: 2 X-Spam_score: 0.2 X-Spam_bar: / X-Spam_report: (0.2 / 5.0 requ) HEADER_FROM_DIFFERENT_DOMAINS=0.25, 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:284074 Archived-At: > * martin rudalics [2021-12-31 20:40:20 +0100]: > >>> 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. Of course. I meant `pop-to-buffer-same-window', not `pop-to-buffer'. Sorry. >> How? > > (add-to-list 'display-buffer-alist > '("\\*shell\\*" nil (inhibit-same-window . t))) > > (pop-to-buffer-same-window "*shell*") Huh, apparently, you have mastered ESP ;-) > Have you ever read sections 29.15.5 and 29.15.6 of the Elisp manual? Presumably you mean "29.13.5 Precedence of Action Functions" and "29.13.6 The Zen of Buffer Display". I think I did, long ago, and I will re-read them now. > 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'. I did not realize that, thank you for pointing this out. -- Sam Steingold (http://sds.podval.org/) on darwin Ns 10.3.2022 http://childpsy.net http://calmchildstories.com http://steingoldpsychology.com https://jihadwatch.org https://ij.org/ https://ffii.org http://think-israel.org You won't get smarter by calling me a fool.