From 41647bdd45532d4b325f24d639c3db8876ae1b66 Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Mon, 18 Oct 2021 08:26:55 -0700 Subject: emacs: select help buffer when it opens Configure how we want to open an help buffer (on the left, with a defined width), and let's jump to it. Enable =visual-line-mode= for help buffers, otherwise it's unreadable. --- emacs/custom/fcuny-navigation.el | 2 ++ emacs/custom/fcuny-ui.el | 10 ++++++++++ 2 files changed, 12 insertions(+) (limited to 'emacs') diff --git a/emacs/custom/fcuny-navigation.el b/emacs/custom/fcuny-navigation.el index 1a420ea..4f2541e 100644 --- a/emacs/custom/fcuny-navigation.el +++ b/emacs/custom/fcuny-navigation.el @@ -1,5 +1,7 @@ (require 'fcuny-vars) +(setq help-window-select t) + (use-package bookmark :custom (bookmark-default-file (expand-file-name "bookmarks" fcuny/path-emacs-var)) diff --git a/emacs/custom/fcuny-ui.el b/emacs/custom/fcuny-ui.el index 487ca3c..0bdc494 100644 --- a/emacs/custom/fcuny-ui.el +++ b/emacs/custom/fcuny-ui.el @@ -94,4 +94,14 @@ (use-package posframe :ensure t) +(setq display-buffer-alist + `( + ("\\*\\(.* # Help.*\\|Help\\)\\*" ; See the hooks for `visual-line-mode' + (display-buffer-reuse-mode-window display-buffer-in-side-window) + (window-width . 0.35) + (side . left) + (slot . 0)))) + +(add-hook 'help-mode-hook #'visual-line-mode) + (provide 'fcuny-ui) -- cgit 1.4.1