File: man.el.html
This code provides a function, man, with which you can browse
UNIX manual pages. Formatting is done in background so that you
can continue to use your Emacs while processing is going on.
The mode also supports hypertext-like following of manual page SEE
ALSO references, and other features. See below or do ? in a
manual page buffer for details.
========== Credits and History ==========
In mid 1991, several people posted some interesting improvements to
man.el from the standard Emacs 18.57 distribution. I liked many of
these, but wanted everything in one single package, so I decided
to incorporate them into a single manual browsing mode. While
much of the code here has been rewritten, and some features added,
these folks deserve lots of credit for providing the initial
excellent packages on which this one is based.
Nick Duffek <duffek@chaos.cs.brandeis.edu>, posted a very nice improvement which retrieved and cleaned the manpages in a background process, and which correctly deciphered such options as man -k.
Eric Rose <erose@jessica.stanford.edu>, submitted manual.el which provided a very nice manual browsing mode.
This package was available as superman.el from the LCD package
for some time before it was accepted into Emacs 19. The entry
point and some other names have been changed to make it a drop-in
replacement for the old man.el package.
Francesco Potortì <pot@cnuce.cnr.it> cleaned it up thoroughly, making it faster, more robust and more tolerant of different systems' man idiosyncrasies.
========== Features ==========
+ Runs "man" in the background and pipes the results through a
series of sed and awk scripts so that all retrieving and cleaning
is done in the background. The cleaning commands are configurable.
+ Syntax is the same as Un*x man
+ Functionality is the same as Un*x man, including "man -k" and
"man <section>", etc.
+ Provides a manual browsing mode with keybindings for traversing
the sections of a manpage, following references in the SEE ALSO
section, and more.
+ Multiple manpages created with the same man command are put into
a narrowed buffer circular list.
============= TODO ===========
- Add a command for printing.
- The awk script deletes multiple blank lines. This behavior does
not allow one to understand if there was indeed a blank line at the
end or beginning of a page (after the header, or before the
footer). A different algorithm should be used. It is easy to
compute how many blank lines there are before and after the page
headers, and after the page footer. But it is possible to compute
the number of blank lines before the page footer by heuristics
only. Is it worth doing?
- Allow a user option to mean that all the manpages should go in
the same buffer, where they can be browsed with M-n and M-p.
Defined variables (57)
Man-ansi-color-basic-faces-vector | The value used here for ‘ansi-color-basic-faces-vector’. |
Man-ansi-color-map | The value formerly used here for ‘ansi-color-map’. |
Man-apropos-regexp | Regular expression describing a reference to manpages in "man -k output". |
Man-awk-command | Program used by ‘man’ to process awk scripts. |
Man-berkeley-sed-script | Script for berkeley-like sed to nuke backspaces and ANSI codes from manpages. |
Man-circular-pages-flag | Non-nil means the manpage list is treated as circular for traversal. |
Man-coding-system | Coding-system to decode output from the commands run by ‘man’. |
Man-completion-cache | Cache of completion table of the form (PREFIX . TABLE). |
Man-cooked-hook | Hook run after removing backspaces but before ‘Man-mode’ processing. |
Man-downcase-section-letters-flag | Non-nil means letters in sections are converted to lower case. |
Man-file-name-regexp | Regular expression describing <> in #include line (directive of cpp). |
Man-files-regexp | Regular expression for FILES heading (or your equivalent). |
Man-filter-list | Manpage cleaning filter command phrases. |
Man-first-heading-regexp | Regular expression describing first heading on a manpage. |
Man-fontify-manpage-flag | Non-nil means make up the manpage with fonts. |
Man-frame-parameters | Frame parameter list for creating a new frame for a manual page. |
Man-header-file-path | C Header file search path used in Man. |
Man-header-regexp | Regular expression describing references to header files. |
Man-heading-regexp | Regular expression describing a manpage heading entry. |
Man-hyphenated-reference-regexp | Regular expression describing a reference in the SEE ALSO section. |
Man-include-regexp | Regular expression describing the #include (directive of cpp). |
Man-man-k-use-anchor | If non-nil prepend ^ to the prefix passed to "man -k" for completion. |
Man-mode-abbrev-table | Abbrev table for ‘Man-mode’. |
Man-mode-hook | Hook run when Man mode is enabled. |
Man-mode-map | Keymap for Man mode. |
Man-mode-syntax-table | Syntax table used in Man mode buffers. |
Man-name-local-regexp | Regexp that matches the text that precedes the command’s name. |
Man-name-regexp | Regular expression describing the name of a manpage (without section). |
Man-normal-file-prefix-regexp | Regular expression describing a file path appeared in FILES section. |
Man-normal-file-regexp | Regular expression describing references to normal files. |
Man-notify-method | Selects the behavior when manpage is ready. |
Man-page-header-regexp | Regular expression describing the heading of a page. |
Man-prefer-synchronous-call | Whether to call the Un*x "man" program synchronously. |
Man-reference-regexp | Regular expression describing a reference to another manpage. |
Man-section-regexp | Regular expression describing a manpage section within parentheses. |
Man-section-translations-alist | Association list of bogus sections to real section numbers. |
Man-sed-command | Program used by ‘man’ to process sed scripts. |
Man-sed-script | Script for sed to nuke backspaces and ANSI codes from manpages. |
Man-see-also-regexp | Regular expression for SEE ALSO heading (or your equivalent). |
Man-specified-section-option | Option that indicates a specified a manual section name. |
Man-support-local-filenames | Internal cache for the value of the function ‘Man-support-local-filenames’. |
Man-support-remote-systems | Whether to call the Un*x "man" program on remote systems. |
Man-switches | Switches passed to the man command, as a single string. |
Man-synopsis-regexp | Regular expression for SYNOPSIS heading (or your equivalent). |
Man-sysv-sed-script | Script for sysV-like sed to nuke backspaces and ANSI codes from manpages. |
Man-topic-history | Topic read history. |
Man-untabify-command | Program used by ‘man’ for untabifying. |
Man-untabify-command-args | List of arguments to be passed to ‘Man-untabify-command’ (which see). |
Man-uses-untabify-flag | Non-nil means use ‘untabify’ instead of ‘Man-untabify-command’. |
Man-width | Number of columns for which manual pages should be formatted. |
Man-width-max | Maximum number of columns allowed for the width of manual pages. |
man-common-abbrev-table | Abbrev table for ‘man-common’. |
man-common-hook | Hook run after entering ‘man-common’. |
man-common-map | Keymap for ‘man-common’. |
man-common-syntax-table | Syntax table for ‘man-common’. |
man-imenu-title | The title to use if man adds a Contents menu to the menubar. |
manual-program | Program used by ‘man’ to produce man pages. |
Defined functions (53)
Defined faces (3)
Man-overstrike | Face to use when fontifying overstrike. |
Man-reverse | Face to use when fontifying reverse video. |
Man-underline | Face to use when fontifying underlining. |