Last edit
Summary: add a bit about -l, -k, Man-width, Man-notify-method
Changed:
< You can read man pages using <code>M-x man</code> (if you have man installed) or using <code>M-x woman</code> (if you don't). See [[Manual:manual page]] for basic information.
< <code>M-x man</code> can prepare man pages in the
< background using the external man program, so it might be a bit nicer
< to use when reading long man pages, or when the system is very slow.
to
> You can read man pages using <code>M-x man</code> (if you have man installed) or using <code>M-x woman</code> (if you don't). See [[Manual:manual page]] for basic information, or WomanMode for the elisp-only alternative.
> <code>M-x man</code> prepares pages in the
> background using the external <code>man</code> program, which is good for a big man page, or when the system is very slow.
Changed:
< find that disturbing, too. See WomanMode for the elisp-only
< alternative.
< The man program will use the <code>MANWIDTH</code> or <code>COLUMNS</code> environment variables
< to determine how wide man pages are. Emacs sets the <code>COLUMNS</code>
< environment variable to the frame width, if neither is set.
to
> find that disturbing, too. (See the <code>Man-notify-method</code> variable for how aggressively it displays.)
> What you enter for <code>M-x man</code> basically goes straight to the man command line, so "<code>-l /some/file.1</code>" can format a particular file. See ManPreview for similar on a buffer.
> You can search for pages with "<code>-k pattern</code>" and press Ret to go to one that's found. (A feature which has existed for quite a while, but been kept secret in the manual and docstrings!) See SystemApropos for similar as a separate command.
> = Formatting Width =
> The man program uses the <code>MANWIDTH</code> or <code>COLUMNS</code> environment variables
> for how wide man pages are.
> Emacs sets <code>COLUMNS</code> to the window width by default, or per the <code>Man-width</code> variable. You can also force a setting with
Changed:
< * NroffMode -- editing manpage source (including previewing it)
to
> * NroffMode -- editing manpage source
> * ManPreview -- formatting manpage source from a buffer
You can read man pages using M-x man (if you have man installed) or using M-x woman (if you don’t). See manual page for basic information, or WomanMode for the elisp-only alternative.
M-x man prepares pages in the background using the external man program, which is good for a big man page, or when the system is very slow. On the other hand, the man page will pop up seconds later, and some find that disturbing, too. (See the Man-notify-method variable for how aggressively it displays.)
What you enter for M-x man basically goes straight to the man command line, so “-l /some/file.1” can format a particular file. See ManPreview for similar on a buffer.
You can search for pages with “-k pattern” and press Ret to go to one that’s found. (A feature which has existed for quite a while, but been kept secret in the manual and docstrings!) See SystemApropos for similar as a separate command.
The man program uses the MANWIDTH or COLUMNS environment variables for how wide man pages are. Emacs sets COLUMNS to the window width by default, or per the Man-width variable. You can also force a setting with
(setenv "MANWIDTH" "72")
There’s no page name completion with M-x man, but man-completion.el or Iman are possibilities. man-completion.el can notice a Perl module name at point for the default.
You can also try the following to press the completion from WoMan into service (getting filenames instead of page names as such, so possibly with subtle differences in pages found)
(defadvice man (before my-woman-prompt activate)
(interactive (progn
(require 'woman)
(list (woman-file-name nil)))))See also:
apropos command to search for man pages