GNU bug report logs -
#36767
26.1; request: add more quick keys to the *Help* buffer
Previous Next
Reported by: ndame <emacsuser <at> freemail.hu>
Date: Mon, 22 Jul 2019 20:31:01 UTC
Severity: wishlist
Found in version 26.1
Fixed in version 28.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> 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.
FWIW, I use this, which I bind to `q' (remap `quit-window'):
;; Candidate as a replacement for `quit-window', at least
;; when used interactively. For example:
;; (define-key global-map [remap quit-window] 'quit-window-delete)
;;
;; Thanks to Martin Rudalics for suggestions.
;;
(defun quit-window-delete (&optional kill window)
"Quit WINDOW, deleting it, and bury its buffer.
WINDOW must be a live window and defaults to the selected one.
With prefix argument KILL non-nil, kill the buffer instead of
burying it.
This is similar to the version of `quit-window' that Emacs had before
the introduction of `quit-restore-window'. It ignores the information
stored in WINDOW's `quit-restore' window parameter.
It deletes the WINDOW more often, rather than switching to another
buffer in it. If WINDOW is alone in its frame then the frame is
deleted or iconified, according to option `frame-auto-hide-function'."
(interactive "P")
(set-window-parameter window 'quit-restore `(frame frame nil ,(current-buffer)))
(quit-restore-window window (if kill 'kill 'bury)))
This bug report was last modified 3 years and 239 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.