unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#68978: Fix Buffer-menu-other-window to display buffers in other window
@ 2024-02-07 17:28 Juri Linkov
  2024-02-10 17:57 ` Juri Linkov
  0 siblings, 1 reply; 2+ messages in thread
From: Juri Linkov @ 2024-02-07 17:28 UTC (permalink / raw)
  To: 68978

Tags: patch

Here is the patch that fixes Buffer-menu-other-window
and Buffer-menu-switch-other-window to inhibit the same window
that will display the buffer in another window:

diff --git a/lisp/buff-menu.el b/lisp/buff-menu.el
index b13492c5002..1645cda7df0 100644
--- a/lisp/buff-menu.el
+++ b/lisp/buff-menu.el
@@ -592,13 +592,17 @@ Buffer-menu-this-window
 (defun Buffer-menu-other-window ()
   "Select this line's buffer in other window, leaving buffer menu visible."
   (interactive nil Buffer-menu-mode)
-  (switch-to-buffer-other-window (Buffer-menu-buffer t)))
+  (let ((display-buffer-overriding-action
+         '(nil (inhibit-same-window . t))))
+    (switch-to-buffer-other-window (Buffer-menu-buffer t))))
 
 (defun Buffer-menu-switch-other-window ()
   "Make the other window select this line's buffer.
 The current window remains selected."
   (interactive nil Buffer-menu-mode)
-  (display-buffer (Buffer-menu-buffer t) t))
+  (let ((display-buffer-overriding-action
+         '(nil (inhibit-same-window . t))))
+    (display-buffer (Buffer-menu-buffer t) t)))
 
 (defun Buffer-menu-2-window ()
   "Select this line's buffer, with previous buffer in second window."





^ permalink raw reply related	[flat|nested] 2+ messages in thread

* bug#68978: Fix Buffer-menu-other-window to display buffers in other window
  2024-02-07 17:28 bug#68978: Fix Buffer-menu-other-window to display buffers in other window Juri Linkov
@ 2024-02-10 17:57 ` Juri Linkov
  0 siblings, 0 replies; 2+ messages in thread
From: Juri Linkov @ 2024-02-10 17:57 UTC (permalink / raw)
  To: 68978

close 68978 30.0.50
quit

> Here is the patch that fixes Buffer-menu-other-window
> and Buffer-menu-switch-other-window to inhibit the same window
> that will display the buffer in another window:

Pushed to master and closed.





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-02-10 17:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-07 17:28 bug#68978: Fix Buffer-menu-other-window to display buffers in other window Juri Linkov
2024-02-10 17:57 ` Juri Linkov

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).