I should have read the documentation of WoMan-find-buffer before sending that earlier patch.
Here's a patch to fix that.
- The display-buffer is still retained in WoMan-find-buffer so that the display-buffer-alist rules can apply. But after that the switch-to-buffer calls are added so that (1) the point switches to the WoMan buffer, and (2) WoMan-find-buffer returns the buffer name (instead of the window name, which display-buffer returns).
Ari: Please let us know if the patch fixes the bug for you. I have verified it to fix it for me locally.
Thanks.
From db908f6fc7bd64266744a32664d9c60fb132595a Mon Sep 17 00:00:00 2001
Date: Sat, 9 Jan 2016 11:29:40 -0500
Subject: [PATCH] WoMan-find-buffer switches to/returns buffer
- Fix for bug #22332
---
lisp/woman.el | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/lisp/woman.el b/lisp/woman.el
index 4ca7dbe..24dbd63 100644
--- a/lisp/woman.el
+++ b/lisp/woman.el
@@ -2061,20 +2061,23 @@ WoMan-find-buffer
(if (zerop woman-buffer-number)
(let ((buffer (get-buffer (cdr (car woman-buffer-alist)))))
(if buffer
- (display-buffer buffer)
+ (progn
+ (display-buffer buffer)
+ (switch-to-buffer buffer))
;; Delete alist element:
(setq woman-buffer-alist (cdr woman-buffer-alist))
nil))
(let* ((prev-ptr (nthcdr (1- woman-buffer-number) woman-buffer-alist))
(buffer (get-buffer (cdr (car (cdr prev-ptr))))))
(if buffer
- (display-buffer buffer)
+ (progn
+ (display-buffer buffer)
+ (switch-to-buffer buffer))
;; Delete alist element:
(setcdr prev-ptr (cdr (cdr prev-ptr)))
(if (>= woman-buffer-number (length woman-buffer-alist))
(setq woman-buffer-number 0))
nil))))
-
;;; Syntax and display tables:
--
2.6.0.rc0.24.gec371ff