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

From: martin rudalics <[email-masked]>
Date: Wed, 12 Dec 2012 10:42:21 +0100

> 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.

You're right.  It shouldn't.

 > 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.

This look quite silly, indeed.

-		     (switch-to-buffer-other-window "*Help*")
+		     (if (not (equal (buffer-name) "*Help*")) (switch-to-buffer-other-window "*Help*" t))

Using t as NORECORD argument is correct IMO.  Checking whether *Help* is
current is not quite correct (the current buffer is not necessarily
displayed in the selected window) but good enough for interactive use.
I think a simple `pop-to-buffer' would suffice here.

But I'm not sure whether `help-for-help' should use *Help* in the first
place.  A user might want to consult `help-for-help' and continue/resume
watching the current help information.  Does anyone see a downside to
renaming the buffer used by `help-for-help' to *help-for-help* (with a
leading space)?

martin