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: Tue, 4 Jan 2022 11:26:45 +0100 Message-ID: <7402a9b1-91cf-a14e-32dc-e9a0cd27dd82@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> <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> 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="27241"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Lars Ingebrigtsen , emacs-devel@gnu.org, Dmitry Gutov , Eli Zaretskii , sdsg@amazon.com To: Juri Linkov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Jan 04 11:27:55 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 1n4h2o-0006xy-Jh for ged-emacs-devel@m.gmane-mx.org; Tue, 04 Jan 2022 11:27:54 +0100 Original-Received: from localhost ([::1]:35846 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n4h2n-0003ET-HF for ged-emacs-devel@m.gmane-mx.org; Tue, 04 Jan 2022 05:27:53 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:50050) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n4h1q-0001Y0-I5 for emacs-devel@gnu.org; Tue, 04 Jan 2022 05:26:54 -0500 Original-Received: from mout.gmx.net ([212.227.17.22]:52947) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n4h1o-0000qb-Rx; Tue, 04 Jan 2022 05:26:54 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1641292007; bh=UaiDYmwqcbAllgE2LOIvWBb8bhWpIVRAsRcuG7r5mHs=; h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To; b=dIWWJx/4bZPafr/9cpfj8P5mQ7Nm57ECobvY4jor4B93EELH5FMQm2vnybwvAwoDA 3uBWGlFfEXGIlVyLNd1S7D2SdDv3nGylvpqf20JgXxe1WJWQxT1+B8XCN8AtIq+YW7 wJR6j5RY5JeCF1kAcFad/iFsiDYVHFYguCU8w3VQ= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from [192.168.1.101] ([212.95.5.171]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MI5QF-1n8o9g03Xj-00FFUA; Tue, 04 Jan 2022 11:26:47 +0100 In-Reply-To: <867dbgtuls.fsf@mail.linkov.net> Content-Language: en-US X-Provags-ID: V03:K1:NrLVLVctRrLecaoAEjAFbAkAqTcHVyNdWadmtXkpsi3qyP8ougM wXYzCCiCehMnXgGF4sM2t5xEnIx45qxbwSbhZaACiIh/G9u1zh+StHiBrW806XVIkaXVNOX 712mCjEGVs3IzSsN0CFxD53fotdVETyAmCyn9uUcVnW6EWNjFuSqchrAhH96AhnKlAud4DN G2H4ihEKUlLWjEvjsvGkg== X-UI-Out-Filterresults: notjunk:1;V03:K0:buAACL/yFnQ=:ZTjnS0ORkZrbZDeoeDjZA7 PvuBlrOES9n/EhNKJDrhMSNB5lyWhLY/+DeH5obzSSqkzzT+InLBuzis8Qzun1LMREt2jJNNr C/VfXbdoD2XD9Y2JlajcZLKDzcuyv8qImuyYbxGe+Peow+8aO4tKTZbcd2SKj1DqDiH1YDXac EFMj0OxvNl/VH1Dj0rDfCoBswm8Q8OizK46HWZ5uWwtIUhZcQw5mVmL+ZcPiIqzdqOuDprYWc HSuKP9zpar91anBYb1KRFHFJynudQuJM/gBH6sns84XjpePJe9W+5iq99s1Z/OLa5wee7Md5U tOEE4SvvXJcUrUeioB7EhiCmzWfcxUYk5+IbYQlkP0k+rGU9edIQAXZlI563hhOSuPsKz7GBA 6JJMEIlMkUxDCVEDtj7ouKykeEI5G36nFWZ5vdN8QDZLVRNv9S0BqTKMQRFxNNPNp1N/mUI1r ivWIqr/yZDcs57doCEmjDydZEzooruuAuhjAcV33oZBmUO9pHbbOgOU+KU5Sg5G9hCrkECVuz IcPg301XsHR1GrGAXhstauBAx/9/+Vvalw4sBBxMZTcS9JkprSjmiBH7/rGisM82XayKdziuw ouIjcq4STVvT7sq7fsEaWEApHNSKQtytO7VuS5wIUya+T1AdTYh/BnJEnhlsG9lJwtHF1EDWe 0QQDrRC3++/WEa/5zhDyVS0dlB2+IUFNKg36TokQxpn/0A41wD0VaM2Ziw3gHWiO9/Z1keQ/K 8CUOyZ0Pxz68hsFgwMpM/vR6R9+TJv9979WchkIiFE1HtcI1h0hTuXHweMPLLSKdeHkWLryh Received-SPF: pass client-ip=212.227.17.22; 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_H5=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:284137 Archived-At: > Or to add more semantics: > > (pop-to-buffer "*shell*" '(nil . ((caller . comint)))) IIRC I once used the term 'label' for it. It vanished soon. >> which means that customizing 'display-buffer-alist' with that value on >> Emacs 28 will report a mismatch but that's the only mishap that should >> happen. >> >> We also could have 'display-buffer-assq-regexp' do >> >> (when (or (and (stringp key) >> (string-match-p key buffer-name)) >> (and (functionp key) >> (funcall key buffer-name action)) >> (and (symbolp key) >> (cadr (assq key (cdr action))))) > > That will shorten the above example to > > (customize-set-variable > 'display-buffer-alist > '((comint > display-buffer-same-window (nil)))) > > ? Yes. Although we should be careful with the symbol. 'shell' would be interpreted as a function to call via (funcall key buffer-name action). We could wrap that in a 'condition-case' but what if the function has some nasty side-effect before it errs out? So maybe *comint* or something similar ... >> so we could do away with 'display-buffer-match-comint' but then we would >> have to change the custom type of 'display-buffer-alist' - no great deal >> either. WDYT? > > The obvious downside is the need to tag hundreds of existing calls of > display-buffer, pop-to-buffer, etc. Just the ones we care about. With our usual speed of progress in this area I won't live long enough to see that happen. Think of pearls like (select-window ; to return to (prog1 (selected-window) ; WoMan window (select-window (display-buffer (current-buffer))) martin