Subject: bug#36767: 26.1; request: add more quick keys to the *Help* buffer

From: Stephen Berman <[email-masked]>
Date: Fri, 18 Jun 2021 16:32:23 +0200

On Fri, 18 Jun 2021 13:58:32 +0300 Eli Zaretskii <[email-masked]> wrote:

>> From: Robert Pluim <[email-masked]>
>> Cc: Juri Linkov <[email-masked]>,  [email-masked],  [email-masked],
>>   [email-masked]
>> Date: Fri, 18 Jun 2021 09:20:02 +0200
>> 
>>     Eli> And that need to go to *Help* is, for me, the single significant
>>     Eli> annoyance with Help commands.  For example, I frequently want to look
>>     Eli> at the source of a function whose doc string I just requested, and its
>>     Eli> a nuisance to have to click on the button there or go to the *Help*
>>     Eli> buffer, find the button, and press RET.
>> 
>> I guess you donʼt like (setq help-window-select t)
>
> The nuisance is to have to switch to the Help window.  That variable
> saves the command to switch to it, but it doesn't change the fact that
> you are no longer in your original window/buffer.  Viewing help
> shouldn't interfere with the window/buffer where you do your main
> work, IMO.

I'm using this:

(defun srb-quit-help (&optional any-frame)
  "Quit *Help* buffer without selecting it.
With prefix argument ANY-FRAME quit *Help* on any visible frame,
otherwise quit *Help* buffer only on the selected frame."
  (interactive "P")
  (let ((help-window (get-buffer-window "*Help*" (if any-frame 'visible))))
    (when help-window
      (with-selected-window help-window (quit-window)))))
(global-set-key "\C-cq" 'srb-quit-help)

Of course, if such a command were added to Emacs, it would need a key
binding not reserved for users, and that's where the real difficulty
lies.

Steve Berman