Subject: bug#13146: closed (Re: bug#13146: [PATCH] help-for-help interferes with buffer order, and displays help in too many windows)

From: [email-masked] (GNU bug Tracking System)
Date: Mon, 17 Dec 2012 13:41:03 +0000

Your bug report

#13146: [PATCH] help-for-help interferes with buffer order, and displays help in too many windows

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
13146: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=13146
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#13146: [PATCH] help-for-help interferes with buffer order, and displays help in too many windows
From: martin rudalics <[email-masked]>
To: [email-masked]
Cc: Kelly Dean <[email-masked]>
Date: Mon, 17 Dec 2012 14:38:44 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

 > Attached. Works fine for me.

Installed on trunk as revision 111254.  Bug closed.

Thanks, martin

Subject: [PATCH] help-for-help interferes with buffer order, and displays help in too many windows
From: Kelly Dean <[email-masked]>
To: [email-masked]
Date: Tue, 11 Dec 2012 10:57:39 -0800 (PST)
List-Id: <debbugs-submit.debbugs.gnu.org>

In 24.2, do emacs -Q, then
M-x split-window RET C-x b foo RET C-x b bar RET C-h C-h C-g C-x b
It defaults to *Help*, but it should default to foo; transiently displaying help-for-help shouldn't modify the buffer order.

Now do C-g C-h f mark RET C-x o C-h C-h
It shows the help-for-help page in both windows, but it should show it in only one.

The attached helphelpbug.patch fixes both problems. I'm not bothering to submit separate reports for the two since it's a one-line patch.
--- emacs-24.2/lisp/help-macro.el
+++ emacs-24.2/lisp/help-macro.el
@@ -130,7 +130,7 @@
 		   (when (or (eq char ??) (eq char help-char)
 			     (memq char help-event-list))
 		     (setq config (current-window-configuration))
-		     (switch-to-buffer-other-window "*Help*")
+		     (if (not (equal (buffer-name) "*Help*")) (switch-to-buffer-other-window "*Help*" t))
 		     (and (fboundp 'make-frame)
 			  (not (eq (window-frame (selected-window))
 				   prev-frame))