5.23.1 Man Install

Simplified Install

If Casual is installed using package-install, then you can use casual-init to setup support for Man.

By default, casual-init will setup support for Man via the hook function casual-man-init which is included in the customizable variable casual-init-hook.

Use the command customize-variable on casual-init-hook to control inclusion of casual-man-init via a checkbox interface.

Refer to the Simplified Install (Install) section for more detail on customizing casual-init.

Casual makes opinionated decisions on the keybindings used in its menus. Such opinions are extended from said menus to the keymap(s) of a particular mode. For Man, this can be controlled via the customizable variable casual-man-add-extra-keybindings (default t).

Hook Install

Users who want a more granular install of Casual modules can invoke the hook function of interest in their Emacs initialization file.

(casual-man-init)

Manual Install

For users who have manually installed Casual outside of package-install, the following guidance is offered.

The primary interface for Casual Man is the Transient menu casual-man-tmenu. It is autoloaded ((elisp)Autoload) so if Casual is installed via package-install ((emacs)Package Installation) then casual-man-tmenu can be invoked via execute-extended-command (M-x) without need for modifying your Emacs initialization file.

That said, Casual is designed with the intent of using a common (key)binding across multiple modes to lower cognitive load. This document uses the binding C-o for this purpose, but can be changed to user preference.

There are many ways to configure this binding. Shown below is a straightforward implementation:

(require 'casual-man) ; load all dependencies including `man'
(keymap-set Man-mode-map "C-o" #'casual-man-tmenu)

If lazy loading of the man package is desired then try using eval-after-load:

(eval-after-load 'man
  (keymap-set Man-mode-map "C-o" #'casual-man-tmenu))

Additional Bindings

casual-man-tmenu deviates from the default bindings of Man-mode-map as shown in the table below.

Default BindingCasual BindingCommandNotes
n[Man-previous-sectionMake consistent with Casual Dired and IBuffer behavior.
p]Man-next-sectionMake consistent with Casual Dired and IBuffer behavior.
kKMan-killReserve k for navigation.
kprevious-line
jnext-line
ncasual-lib-browser-forward-paragraphUse to navigate paragraph forward.
pcasual-lib-browser-backward-paragraphUse to navigate paragraph backward.

The following keybindings are recommended to support consistent behavior between Man-mode and casual-man-tmenu.

(keymap-set Man-mode-map "n" #'casual-lib-browse-forward-paragraph)
(keymap-set Man-mode-map "p" #'casual-lib-browse-backward-paragraph)
(keymap-set Man-mode-map "[" #'Man-previous-section)
(keymap-set Man-mode-map "]" #'Man-next-section)
(keymap-set Man-mode-map "j" #'next-line)
(keymap-set Man-mode-map "k" #'previous-line)
(keymap-set Man-mode-map "K" #'Man-kill)
(keymap-set Man-mode-map "o" #'casual-man-occur-options)