WoMan: Browse Unix Manual Pages “W.O. (without) Man”
As distributed with Emacs 29.1.90. Francis J. Wright School of Mathematical Sciences Queen Mary and Westfield College (University of London) Mile End Road, London E1 4NS, UK
This file documents WoMan: A program to browse Unix manual pages “W.O. (without) man”.
Copyright © 2001–2024 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, with the Front-Cover Texts being “A GNU Manual,” and with the Back-Cover Texts as in (a) below. A copy of the license is included in the section entitled “GNU Free Documentation License.”
(a) The FSF’s Back-Cover Text is: “You have the freedom to copy and modify this GNU manual.”
Table of Contents
Next: Background, Previous: WoMan: Browse Unix Manual Pages “W.O. (without) Man”, Up: WoMan: Browse Unix Manual Pages “W.O. (without) Man” [Contents][Index]
1 Introduction
WoMan was developed primarily on various versions of Microsoft Windows, but has also been tested on MS-DOS, and various versions of UNIX and GNU/Linux.
WoMan is distributed with GNU Emacs.
WoMan implements a subset of the formatting performed by the Emacs
man
(or manual-entry
) command to format a Unix-style
manual page (usually abbreviated to man page) for display,
but without calling any external programs. It is intended to emulate
the whole of the roff -man
macro package, plus those roff
requests (see Background) that are most commonly used
in man pages. However, the emulation is modified to include the
reformatting done by the Emacs man
command. No hyphenation is
performed.
- Advantages
Much more direct, does not require any external programs. Supports completion on man page names.
- Disadvantages
Not a complete emulation. Currently no support for
eqn
ortbl
. Slightly slower for large man pages (but usually faster for small- and medium-size pages).
This browser works quite well on simple well-written man files. It
works less well on idiosyncratic files that “break the rules” or use
the more obscure roff
requests directly. Current test results
are available in the file
woman.status.
WoMan supports the use of compressed man files via
auto-compression-mode
by turning it on if necessary. But you may
need to adjust the user option woman-file-compression-regexp
.
See Interface Options.
Brief help on the WoMan interactive commands and user options, all of
which begin with the prefix woman-
(or occasionally
WoMan-
), is available most easily by loading WoMan and then
either running the command woman-mini-help
or selecting the WoMan
menu option ‘Mini Help’.
Guidance on reporting bugs is given below. See Reporting Bugs.
Next: Finding and Formatting Man Pages, Previous: Introduction, Up: WoMan: Browse Unix Manual Pages “W.O. (without) Man” [Contents][Index]
2 Background
WoMan is a browser for traditional Unix-style manual page documentation.
Each such document is conventionally referred to as a manual page,
or man page for short, even though some are very much longer than
one page. A man page is a document written using the Unix “man”
macros, which are themselves written in the nroff/troff text processing
markup language. nroff
and troff
are text processors
originally written for the UNIX operating system by Joseph F. Ossanna at
Bell Laboratories, Murray Hill, New Jersey, USA. They are closely
related, and except in the few cases where the distinction between them
is important I will refer to them both ambiguously as roff
.
roff
markup consists of requests and escape
sequences. A request occupies a complete line and begins with either a
period or an apostrophe. An escape sequence is embedded
within the input text and begins (by default) with a backslash. The
original man macro package defines 20 new roff
requests
implemented as macros, which were considered to be sufficient for
writing man pages. But whilst in principle man pages use only the man
macros, in practice a significant number use many other roff
requests.
The distinction between troff
and nroff
is that
troff
was designed to drive a phototypesetter whereas
nroff
was designed to produce essentially ASCII output for a
character-based device similar to a teletypewriter (usually abbreviated
to “teletype” or “tty”). Hence, troff
supports much finer
control over output positioning than does nroff
and can be seen
as a forerunner of TeX. Traditionally, man pages are either
formatted by troff
for typesetting or by nroff
for
printing on a character printer or displaying on a screen. Of course,
over the last 25 years or so, the distinction between typeset output on
paper and characters on a screen has become blurred by the fact that
most screens now support bit-mapped displays, so that any information
that can be printed can also be rendered on screen, the only difference
being the resolution.
Nevertheless, Unix-style manual page documentation is still normally
browsed on screen by running a program called man
. This program
looks in a predefined set of directories for the man page matching a
specified topic, then either formats the source file by running
nroff
or recovers a pre-formatted file, and displays it via a
pager such as more
. nroff
normally formats for a printer,
so it paginates the output, numbers the pages, etc., most of which is
irrelevant when the document is browsed as a continuous scrollable
document on screen. The only concession to on-screen browsing normally
implemented by the man
program is to squeeze consecutive blank
lines into a single blank line.
For some time, Emacs has offered an improved interface for browsing man
pages in the form of the Emacs man
(or manual-entry
)
command, see Documentation Commands in GNU
Emacs Manual.
This command runs man
as described above, perhaps in
the background, and then post-processes the output to remove much of the
nroff
pagination such as page headers and footers, and places the
result into an Emacs buffer. It puts this buffer into a special major
mode, which is tailored for man page browsing, and provides a number of
useful navigation commands, support for following references, etc. It
provides some support for special display faces (fonts), but no special
menu or mouse support. The Emacs man package appears to have been
developed over about 10 years, from the late 1980s to the late 1990s.
There is considerable inefficiency in having nroff
paginate a
document and then removing most of the pagination!
WoMan is an Emacs Lisp library that provides an emulation of the
functionality of the Emacs man
command, the main difference being
that WoMan does not use any external programs. The only situation in
which WoMan might use an external program is when the source file is
compressed, when WoMan will use the standard Emacs automatic
decompression facility, which does call an external program.
I began developing WoMan in the Spring of 1997 and the first version was
released in May 1997. The original motivation for WoMan was the fact
that many GNU and Unix programs are ported to other platforms and come
with Unix-style manual page documentation. This may be difficult to
read because ports of the Unix-style man
program can be a little
awkward to set up. I decided that it should not be too hard to emulate
the 20 man
macros directly, without treating them as macros and
largely ignoring the underlying roff
requests, given the text
processing capabilities of Emacs. This proved to be essentially true,
and it did not take a great deal of work to be able to format simple man
pages acceptably.
One problem arose with the significant number of man pages that use
roff
requests in addition to the man
macros, and since
releasing the first version of WoMan I have been continually extending
it to support more roff
requests. WoMan can now format a
significant proportion of the man pages that I have tested, either well
or at least readably. However, I have added capabilities partly by
making additional passes through the document, a design that is
fundamentally flawed. This can only be solved by a major re-design of
WoMan to handle the major formatting within a single recursive pass,
rather than the present multiple passes without any significant
recursion. There are some roff
requests that cannot be handled
satisfactorily within the present design. Some of these are currently
handled by kludges that “usually more or less work.”
The principle advantage of WoMan is that it does not require man
,
and indeed the name WoMan is a contraction of “without man.” But it
has other advantages. It does not paginate the document, so it does not
need to un-paginate it again, thereby saving time. It could take full
advantage of the display capabilities available to it, and I hope to
develop WoMan to take advantage of developments in Emacs itself. At
present, WoMan uses several display faces to support bold and italic
text, to indicate other fonts, etc. The default faces are also
colored, but the choice of faces is customizable. WoMan provides menu
support for navigation and mouse support for following references, in
addition to the navigation facilities provided by man
mode.
WoMan has (this) texinfo documentation!
WoMan does not replace man
, although it does use a number
of the facilities implemented in the Emacs man
library. WoMan
and man can happily co-exist, which is very useful for comparison and
debugging purposes.
Next: Browsing Man Pages, Previous: Background, Up: WoMan: Browse Unix Manual Pages “W.O. (without) Man” [Contents][Index]
3 Finding and Formatting Man Pages
WoMan provides three user interfaces for finding and formatting man pages:
Jump to: | B D E M N S W |
---|
Jump to: | B D E M N S W |
---|
Next: Keystroke Index, Previous: Command Index, Up: WoMan: Browse Unix Manual Pages “W.O. (without) Man” [Contents][Index]
Variable Index
Jump to: | W |
---|
Jump to: | W |
---|
Next: Concept Index, Previous: Variable Index, Up: WoMan: Browse Unix Manual Pages “W.O. (without) Man” [Contents][Index]
Keystroke Index
Jump to: | -
.
0
<
>
?
D G K M N P Q R S W |
---|
Index Entry | Section | ||
---|---|---|---|
| |||
- | |||
- : | Convenience | ||
| |||
. | |||
. : | Convenience | ||
| |||
0 | |||
0 .. 9 : | Convenience | ||
| |||
< | |||
< : | Convenience | ||
| |||
> | |||
> : | Convenience | ||
| |||
? | |||
? : | Convenience | ||
| |||
D | |||
DEL : | Navigation | ||
| |||
G | |||
g : | Navigation | ||
| |||
K | |||
k : | Changing | ||
| |||
M | |||
m : | Changing | ||
M-n : | Changing | ||
M-p : | Changing | ||
mouse-2 : | References | ||
| |||
N | |||
n : | Navigation | ||
| |||
P | |||
p : | Navigation | ||
| |||
Q | |||
q : | Changing | ||
| |||
R | |||
r : | References | ||
R : | Changing | ||
RET : | References | ||
| |||
S | |||
s : | Navigation | ||
S-SPC : | Navigation | ||
SPC : | Navigation | ||
| |||
W | |||
w : | Changing | ||
|
Jump to: | -
.
0
<
>
?
D G K M N P Q R S W |
---|
Previous: Keystroke Index, Up: WoMan: Browse Unix Manual Pages “W.O. (without) Man” [Contents][Index]
Concept Index
Jump to: | A B C D F H I K L M N P R S T U V W |
---|
Jump to: | A B C D F H I K L M N P R S T U V W |
---|