[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#36917: 27.0.50; debbugs-gnu: Don't hardcode switch-to-buffer

From: Michael Heerdegen
Subject: bug#36917: 27.0.50; debbugs-gnu: Don't hardcode switch-to-buffer
Date: Sun, 18 Aug 2019 14:24:01 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Noam Postavsky <address@hidden> 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:

From 64894d01765e25d03c4c911f24778caeee128901 Mon Sep 17 00:00:00 2001
From: Michael Heerdegen <address@hidden>
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.
 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-gnu.el
index 25fb02958a..515129b95f 100644
--- 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))

     ;; Print bug reports.

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?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]