bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Stephen Berman
Subject: bug#36767: 26.1; request: add more quick keys to the *Help* buffer
Date: Fri, 18 Jun 2021 16:32:23 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

On Fri, 18 Jun 2021 13:58:32 +0300 Eli Zaretskii <eliz@gnu.org> wrote:

>> From: Robert Pluim <rpluim@gmail.com>
>> Cc: Juri Linkov <juri@linkov.net>,  36767@debbugs.gnu.org,  larsi@gnus.org,
>>   emacsuser@freemail.hu
>> 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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]