From b5d3562d6a1e8b27d1f1d0d21fa63c2f4a9b83bb Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Sun, 20 Aug 2023 17:38:48 +0100 Subject: (Emacs)+module configuration for man pages Found out why I can't just use ':display' records to manage displaying of man pages, made some binds as well. Useful for writing C code. --- Emacs/.config/emacs/config.org | 29 +++++++++++++++++++++++++---- 1 file changed, 25 insertions(+), 4 deletions(-) diff --git a/Emacs/.config/emacs/config.org b/Emacs/.config/emacs/config.org index 4ea5d23..03fe716 100644 --- a/Emacs/.config/emacs/config.org +++ b/Emacs/.config/emacs/config.org @@ -976,10 +976,6 @@ records. This is mostly for packages that aren't really configured :straight nil :defer t :display - ("\\*\\(Wo\\)?Man.*" - (display-buffer-at-bottom) - (window-height . 0.25)) - ("\\*Process List\\*" (display-buffer-at-bottom) (window-height . 0.25)) @@ -2142,6 +2138,31 @@ Of course Emacs has a cool screensaver software. :config (zone-when-idle 15)) #+end_src +** (Wo)man +Man pages are the user manuals for most software on Linux. Really +useful when writing code for Un*x systems, though they can be very +verbose. + +2023-08-17: `Man-notify-method' is the reason the `:display' record +doesn't work here. I think it's to do with how Man pages are rendered +or something, but very annoying as it's a break from standards! +#+begin_src emacs-lisp +(use-package man + :demand t + :straight nil + :init + (setq Man-notify-method 'pushy) + :display + ("^\\*Man.*" + (display-buffer-reuse-mode-window) + (display-buffer-same-window)) + :general + (file-leader + "m" #'man) ;; kinda like "find man page" + (nmmap + :keymaps 'Man-mode-map + "RET" #'man-follow)) +#+end_src * Text modes Standard packages and configurations for text-mode and its derived modes. -- cgit v1.2.3-13-gbd6f