From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Michael Heerdegen Newsgroups: gmane.emacs.bugs Subject: bug#36917: 27.0.50; debbugs-gnu: Don't hardcode switch-to-buffer Date: Sun, 18 Aug 2019 14:24:01 +0200 Message-ID: <878srq1x26.fsf@web.de> References: <87ef21ejy4.fsf@web.de> <871ry1i3ys.fsf@gmx.de> <87imrcxgzf.fsf@web.de> <858srx2i0t.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="222442"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: Michael Albinus , 36917@debbugs.gnu.org To: Noam Postavsky Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Aug 18 14:25:27 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hzKFS-000vi1-Ko for geb-bug-gnu-emacs@m.gmane.org; Sun, 18 Aug 2019 14:25:26 +0200 Original-Received: from localhost ([::1]:40782 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1hzKFR-0002Mh-7c for geb-bug-gnu-emacs@m.gmane.org; Sun, 18 Aug 2019 08:25:25 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44156) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1hzKF5-0002J5-GO for bug-gnu-emacs@gnu.org; Sun, 18 Aug 2019 08:25:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hzKF4-0000bM-Ha for bug-gnu-emacs@gnu.org; Sun, 18 Aug 2019 08:25:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:48602) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hzKF4-0000av-8S for bug-gnu-emacs@gnu.org; Sun, 18 Aug 2019 08:25:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hzKF4-0008VR-0O for bug-gnu-emacs@gnu.org; Sun, 18 Aug 2019 08:25:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Michael Heerdegen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 18 Aug 2019 12:25:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36917 X-GNU-PR-Package: emacs Original-Received: via spool by 36917-submit@debbugs.gnu.org id=B36917.156613105132627 (code B ref 36917); Sun, 18 Aug 2019 12:25:01 +0000 Original-Received: (at 36917) by debbugs.gnu.org; 18 Aug 2019 12:24:11 +0000 Original-Received: from localhost ([127.0.0.1]:57423 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hzKEF-0008UB-KY for submit@debbugs.gnu.org; Sun, 18 Aug 2019 08:24:11 -0400 Original-Received: from mout.web.de ([212.227.15.14]:57685) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hzKED-0008Ty-DK for 36917@debbugs.gnu.org; Sun, 18 Aug 2019 08:24:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=dbaedf251592; t=1566131042; bh=y156uNJPIqH65PgPC/DXU7XVkbv03OFTWc7oe+EFIFw=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=X05HAxtsOCjTFujvYLZug8xZZN9KYcd5atkncp+3JBuVlPnafBB5AiDksyBqQQ2Zx LE1LT48M3VHt4DuFE5R6G5Y3FEF4KJWoVRdG9ETWquBxO5Z6wJueFcjZ4BI/g98u0S STQXruLOaP976JS/OoGJlBHHj4EeFxBR1YJdSeEw= X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9 Original-Received: from drachen.dragon ([87.174.84.142]) by smtp.web.de (mrweb003 [213.165.67.108]) with ESMTPSA (Nemesis) id 0LlF82-1iaJTI02ti-00b2vg; Sun, 18 Aug 2019 14:24:02 +0200 In-Reply-To: <858srx2i0t.fsf@gmail.com> (Noam Postavsky's message of "Tue, 13 Aug 2019 11:37:38 -0400") X-Provags-ID: V03:K1:0UJUm3OrxzE/l59BPnK2R3qYG6eA03ADuGo/DLtsv3yEb+JO87D 3SWA0HUDcqX/qlwIZ7LRqV9dKf/4FUBubKW0qoY54106t7fwqm1nz9wXltbC3u3JTnUzyXp 8Ic1lW2/NG99sd6cq2c50sb+EkKuC1L/yk2ITwquD1SLvtl3E3BL3Sagm4dFuUL+geKeCEF FKPp79kP2GBW0tnfOmPpg== X-UI-Out-Filterresults: notjunk:1;V03:K0:mTl5JIqMdf4=:ZrG3WitBeI+fMct1XCr1bz mbxpOeU1O6ZyEcoDpKIMy9n/zA8x9t4zj0vsP4A6zCcKLY3A7syXq67tLp0yRi0xIZ4QxAwgW yMNqqTSwHTQ7r7obqSNWFesdsV8DQxh0C62glVFYZvOgq689JvvQmTloHyXNZgK/f7meyMhXP JRGCgtyFTioilE5Lr6Fn0Xia9lLSWTKb1cnD/Sk2Q8hHFIWunLNOp9ztJhpXGoahGgqoQ1tPO bM6z5GNgwn/ajGcFwFLQ1iCmsYAzmDjIYr50ONHmgmRsyVb33fDrRpKT1g8cJ3+EM6gTApCQv R+kg8e1edyzwBzUPdGmrC1R636GT8GGx+sbYVTk1z5xrlRkokOkaMtwsYmbRXmP0Ato99d5LG /sJO/lrJgwtDsOjKC2Q5XuOltnoJJhSMPIV9pBHAtqAcRgjHPdgjhMsm0+anvNqyWOqrec0lm KbahNqWOVaCSqEonod4L2cMipfe1UtFlUWsx4G4ipETmrR+eePDaCcRz4Jw/sI/qHsL2/JinY oG74AnsphaPEcdVubwXwg/u4DlUEAxrhvnrBSZrmhsUDFOHBzppvM/XNIogAg7vbwF/7YyktD mfaabD4T/FRdX3AAzZVpU+wv1V5jYowryKQQO4ccBPrLZ2g7kxGsChP+4ly41vZsg6of2Uk3N BmMWLW2VuFOYLoOcZGhucopAPoH2Tn27jTb6N1P0cf45aeUUysY6xmmbX0oe7Yb1tkZ9ys+1Q lVUAOyJQ/BKR6GOy2iTQnYMYG+gQk4YnKFtky5dy9ifkeJ98BlJW0nP7x7BqJBlfEYoNC9wD X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:165318 Archived-At: --=-=-= Content-Type: text/plain Noam Postavsky writes: > I guess just a trivial s/switch-to-buffer/pop-to-buffer-same-window/ > would allow the user to control things with display-buffer-alist. Maybe > you could try that and see if it works out? Yeah, that works for me. So I have this patch: --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-Use-pop-to-buffer-same-window-in-debbugs-gnu-show-re.patch Content-Transfer-Encoding: quoted-printable =46rom 64894d01765e25d03c4c911f24778caeee128901 Mon Sep 17 00:00:00 2001 From: Michael Heerdegen Date: Fri, 16 Aug 2019 16:26:22 +0200 Subject: [PATCH] Use pop-to-buffer-same-window in debbugs-gnu-show-reports Use 'pop-to-buffer-same-window' instead of 'switch-to-buffer' to display bug reports so user can configure behavior via 'display-buffer-alist' (Bug#36917). * packages/debbugs/debbugs-gnu.el (debbugs-gnu-show-reports): Use 'pop-to-buffer-same-window' to display bug reports. =2D-- packages/debbugs/debbugs-gnu.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/debbugs/debbugs-gnu.el b/packages/debbugs/debbugs-gn= u.el index 25fb02958a..515129b95f 100644 =2D-- a/packages/debbugs/debbugs-gnu.el +++ b/packages/debbugs/debbugs-gnu.el @@ -722,7 +722,7 @@ are taken from the cache instead." ;; rid of them. (when (get-buffer buffer-name) (kill-buffer buffer-name)) - (switch-to-buffer (get-buffer-create buffer-name)) + (pop-to-buffer-same-window (get-buffer-create buffer-name)) (debbugs-gnu-mode) ;; Print bug reports. =2D- 2.23.0.rc1 --=-=-= Content-Type: text/plain Should I install it? Should I also bump the version? I didn't have a look at the other remaining `switch-to-buffer' calls. Noam, did you mean to substitute all of them? Thanks, Michael. --=-=-=--