Subject: bug#23617: PATCH (25.1.50; Ibuffer in other window)

From: Tino Calancha <[email-masked]>
Date: Thu, 26 May 2016 00:30:01 +0900 (JST)

>From 67500ceb4a0ea5923b3b9f2e1fef4161150c7c96 Mon Sep 17 00:00:00 2001
From: Tino Calancha <[email-masked]>
Date: Thu, 26 May 2016 00:22:42 +0900
Subject: [PATCH] Ibuffer in other window

* lisp/ibuffer.el (ibuffer): Use other window when OTHER-WINDOW-P
non-nil (Bug#23617).
---
  lisp/ibuffer.el | 6 ++++--
  1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/lisp/ibuffer.el b/lisp/ibuffer.el
index dd2687c..d78a8f4 100644
--- a/lisp/ibuffer.el
+++ b/lisp/ibuffer.el
@@ -2341,8 +2341,10 @@ ibuffer
      (setq other-window-p t))
    (let ((buf (get-buffer-create (or name "*Ibuffer*"))))
      (if other-window-p
-	(funcall (if noselect (lambda (buf) (display-buffer buf t)) #'pop-to-buffer) buf)
-      (funcall (if noselect #'display-buffer #'switch-to-buffer) buf))
+	(funcall (lambda (x) (or (and noselect (display-buffer x t))
+                                 (pop-to-buffer x t))) buf)
+      (funcall (or (and noselect #'display-buffer)
+                   #'switch-to-buffer) buf))
      (with-current-buffer buf
        (save-selected-window
  	;; We switch to the buffer's window in order to be able
-- 
2.8.1