From af3c03850130a924611c5cc229f31201432cb000 Mon Sep 17 00:00:00 2001 From: laurensmiers Date: Sun, 11 Nov 2018 15:05:56 +0100 Subject: [PATCH] Switch automatically to *Help* window with describe-key --- config.org | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/config.org b/config.org index 688c74e..a6830f4 100644 --- a/config.org +++ b/config.org @@ -181,6 +181,22 @@ Disable the generation of backup-files, I don't use them. (setq make-backup-files nil) #+END_SRC +** Describe key + +Describe key will open a new buffer with the relevant information. +However, it stays in the current window and opens a new window with the help-info, forcing you to switch buffers to close the help window. +This small function just switches the focus to the newly opened window so we can close it more easily. + +#+BEGIN_SRC emacs-lisp +(defun move-to-help-window () + (switch-to-buffer-other-window "*Help*") +) +(add-hook 'help-mode-hook 'move-to-help-window) +#+END_SRC + +#+RESULTS: +| move-to-help-window | + * Which-key Display available keybindings in popup: