*** empty log message ***
[bpt/emacs.git] / man / woman.texi
CommitLineData
a9212536 1\input texinfo @c -*-texinfo-*-
a9212536
EZ
2@c %**start of header
3@setfilename ../info/woman
d33eb73f 4@settitle WoMan: Browse Unix Manual Pages ``W.O. (without) Man''
a9212536 5@c Manual last updated:
b223e22d 6@set UPDATED Time-stamp: <2006-03-25 14:59:03 karl>
a9212536
EZ
7@c Software version:
8@set VERSION 0.54 (beta)
9@afourpaper
10@c With different size paper the printed page breaks will need attention!
11@c Look for @page and @need commands.
12@setchapternewpage off
13@paragraphindent 0
14@c %**end of header
15
18f952d5 16@copying
d33eb73f 17This file documents WoMan: A program to browse Unix manual pages `W.O.
a9212536
EZ
18(without) man'.
19
b65d8176 20Copyright @copyright{} 2001, 2002, 2003, 2004,
4e6835db 212005, 2006, 2007 Free Software Foundation, Inc.
a9212536 22
18f952d5 23@quotation
a42bec1c 24Permission is granted to copy, distribute and/or modify this document
678e7c71 25under the terms of the GNU Free Documentation License, Version 1.2 or
a42bec1c
EZ
26any later version published by the Free Software Foundation; with no
27Invariant Sections, with the Front-Cover texts being ``A GNU
28Manual,'' and with the Back-Cover Texts as in (a) below. A copy of the
29license is included in the section entitled ``GNU Free Documentation
30License'' in the Emacs manual.
a9212536 31
a42bec1c
EZ
32(a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify
33this GNU Manual, like GNU software. Copies published by the Free
34Software Foundation raise funds for GNU development.''
a9212536 35
a42bec1c
EZ
36This document is part of a collection distributed under the GNU Free
37Documentation License. If you want to distribute this document
38separately from the collection, you can do so by adding a copy of the
39license to the document, as described in section 6 of the license.
18f952d5
KB
40@end quotation
41@end copying
42
43@dircategory Emacs
44@direntry
45* WoMan: (woman). Browse UN*X Manual Pages "W.O. (without) Man".
46@end direntry
a9212536
EZ
47
48@finalout
49
50@titlepage
51@title WoMan
d33eb73f 52@subtitle Browse Unix Manual Pages ``W.O. (without) Man''
a9212536
EZ
53@subtitle Software Version @value{VERSION}
54@author Francis J. Wright
55@sp 2
56@author School of Mathematical Sciences
57@author Queen Mary and Westfield College
58@author (University of London)
59@author Mile End Road, London E1 4NS, UK
e64e15b4 60@author @email{F.J.Wright@@qmul.ac.uk}
a9212536 61@author @uref{http://centaur.maths.qmw.ac.uk/}
e64e15b4 62@c He no longer maintains this manual.
a9212536
EZ
63@sp 2
64@author Manual Last Updated @value{UPDATED}
65
66@comment The following two commands start the copyright page.
67@page
68@vskip 0pt plus 1filll
18f952d5 69@insertcopying
a9212536
EZ
70@end titlepage
71
72@contents
73
74@c ===================================================================
75
76@ifnottex
77@node Top, Introduction, (dir), (dir)
78@comment node-name, next, previous, up
d33eb73f 79@top WoMan: Browse Unix Manual Pages ``W.O. (without) Man''
a9212536
EZ
80
81@display
82Software Version @value{VERSION}
83Manual Last Updated @value{UPDATED}
84
85@email{F.J.Wright@@qmw.ac.uk, Francis J. Wright}
86@uref{http://centaur.maths.qmw.ac.uk/, School of Mathematical Sciences}
87Queen Mary and Westfield College (University of London)
88Mile End Road, London E1 4NS, UK
89@end display
90@end ifnottex
91
92@menu
93* Introduction:: Introduction
94* Background:: Background
a9212536
EZ
95* Finding:: Finding and Formatting Man Pages
96* Browsing:: Browsing Man Pages
97* Customization:: Customization
98* Log:: The *WoMan-Log* Buffer
99* Technical:: Technical Details
100* Bugs:: Reporting Bugs
101* Acknowledgements:: Acknowledgements
102* Command Index:: Command Index
103* Variable Index:: Variable Index
104* Keystroke Index:: Keystroke Index
105* Concept Index:: Concept Index
106@end menu
107
108@c ===================================================================
109
110@node Introduction, Background, Top, Top
111@comment node-name, next, previous, up
112@chapter Introduction
113@cindex introduction
114
115This version of WoMan should run with GNU Emacs 20.3 or later on any
116platform. It has not been tested, and may not run, with any other
117version of Emacs. It was developed primarily on various versions of
118Microsoft Windows, but has also been tested on MS-DOS, and various
256e6c04 119versions of UNIX and GNU/Linux.
a9212536 120
8018c1e8
RS
121WoMan is distributed with GNU Emacs. In addition, the current source
122code and documentation files are available from
123@uref{http://centaur.maths.qmw.ac.uk/Emacs/WoMan/, the WoMan web
124server}.
a9212536
EZ
125
126WoMan implements a subset of the formatting performed by the Emacs
a42bec1c 127@code{man} (or @code{manual-entry}) command to format a Unix-style
a9212536
EZ
128@dfn{manual page} (usually abbreviated to @dfn{man page}) for display,
129but without calling any external programs. It is intended to emulate
04a623aa 130the whole of the @code{roff -man} macro package, plus those @code{roff}
a9212536
EZ
131requests (@pxref{Background, , Background}) that are most commonly used
132in man pages. However, the emulation is modified to include the
133reformatting done by the Emacs @code{man} command. No hyphenation is
134performed.
135
136@table @b
137@item Advantages
138Much more direct, does not require any external programs. Supports
139completion on man page names.
140@item Disadvantages
141Not a complete emulation. Currently no support for @code{eqn} or
142@code{tbl}. Slightly slower for large man pages (but usually faster for
143small- and medium-size pages).
144@end table
145
146This browser works quite well on simple well-written man files. It
147works less well on idiosyncratic files that ``break the rules'' or use
04a623aa 148the more obscure @code{roff} requests directly. Current test results
a9212536 149are available in the file
4711065a 150@uref{http://centaur.maths.qmw.ac.uk/Emacs/WoMan/files/woman.status,
a9212536
EZ
151@file{woman.status}}.
152
153WoMan supports the use of compressed man files via
154@code{auto-compression-mode} by turning it on if necessary. But you may
155need to adjust the user option @code{woman-file-compression-regexp}.
156@xref{Interface Options, , Interface Options}.
157
158Brief help on the WoMan interactive commands and user options, all of
159which begin with the prefix @code{woman-} (or occasionally
160@code{WoMan-}), is available most easily by loading WoMan and then
161either running the command @code{woman-mini-help} or selecting the WoMan
162menu option @samp{Mini Help}.
163
164WoMan is (of course) still under development! Please
a42bec1c 165@email{F.J.Wright@@qmw.ac.uk, let me know} what doesn't work---I am
a9212536
EZ
166adding and improving functionality as testing shows that it is
167necessary. Guidance on reporting bugs is given below. @xref{Bugs, ,
168Reporting Bugs}.
169
170@c ===================================================================
171
04a623aa 172@node Background, Finding, Introduction, Top
a9212536
EZ
173@comment node-name, next, previous, up
174@chapter Background
175@cindex background
176
a42bec1c 177WoMan is a browser for traditional Unix-style manual page documentation.
a9212536
EZ
178Each such document is conventionally referred to as a @dfn{manual page},
179or @dfn{man page} for short, even though some are very much longer than
a42bec1c 180one page. A man page is a document written using the Unix ``man''
04a623aa
RS
181macros, which are themselves written in the nroff/troff text processing
182markup language. @code{nroff} and @code{troff} are text processors
a9212536
EZ
183originally written for the UNIX operating system by Joseph F. Ossanna at
184Bell Laboratories, Murray Hill, New Jersey, USA@. They are closely
185related, and except in the few cases where the distinction between them
04a623aa 186is important I will refer to them both ambiguously as @code{roff}.
a9212536 187
04a623aa 188@code{roff} markup consists of @dfn{requests} and @dfn{escape
a9212536
EZ
189sequences}. A request occupies a complete line and begins with either a
190period or a single forward quote. An escape sequences is embedded
191within the input text and begins (by default) with a backslash. The
04a623aa 192original man macro package defines 20 new @code{roff} requests
a9212536
EZ
193implemented as macros, which were considered to be sufficient for
194writing man pages. But whilst in principle man pages use only the man
04a623aa 195macros, in practice a significant number use many other @code{roff}
a9212536
EZ
196requests.
197
04a623aa
RS
198The distinction between @code{troff} and @code{nroff} is that
199@code{troff} was designed to drive a phototypesetter whereas
200@code{nroff} was designed to produce essentially @acronym{ASCII} output for a
a9212536 201character-based device similar to a teletypewriter (usually abbreviated
04a623aa
RS
202to ``teletype'' or ``tty''). Hence, @code{troff} supports much finer
203control over output positioning than does @code{nroff} and can be seen
a9212536 204as a forerunner of @TeX{}. Traditionally, man pages are either
04a623aa 205formatted by @code{troff} for typesetting or by @code{nroff} for
a9212536
EZ
206printing on a character printer or displaying on a screen. Of course,
207over the last 25 years or so, the distinction between typeset output on
208paper and characters on a screen has become blurred by the fact that
209most screens now support bit-mapped displays, so that any information
210that can be printed can also be rendered on screen, the only difference
211being the resolution.
212
a42bec1c 213Nevertheless, Unix-style manual page documentation is still normally
a9212536
EZ
214browsed on screen by running a program called @code{man}. This program
215looks in a predefined set of directories for the man page matching a
216specified topic, then either formats the source file by running
04a623aa
RS
217@code{nroff} or recovers a pre-formatted file, and displays it via a
218pager such as @code{more}. @code{nroff} normally formats for a printer,
a9212536
EZ
219so it paginates the output, numbers the pages, etc., most of which is
220irrelevant when the document is browsed as a continuous scrollable
221document on screen. The only concession to on-screen browsing normally
222implemented by the @code{man} program is to squeeze consecutive blank
223lines into a single blank line.
224
225For some time, Emacs has offered an improved interface for browsing man
226pages in the form of the Emacs @code{man} (or @code{manual-entry})
227command, see @ref{Documentation, man, Documentation Commands, emacs, GNU
228Emacs Manual}.
229This command runs @code{man} as described above, perhaps in
230the background, and then post-processes the output to remove much of the
04a623aa 231@code{nroff} pagination such as page headers and footers, and places the
a9212536
EZ
232result into an Emacs buffer. It puts this buffer into a special major
233mode, which is tailored for man page browsing, and provides a number of
234useful navigation commands, support for following references, etc. It
235provides some support for special display faces (fonts), but no special
236menu or mouse support. The Emacs man package appears to have been
237developed over about 10 years, from the late 1980s to the late 1990s.
238
04a623aa 239There is considerable inefficiency in having @code{nroff} paginate a
a9212536
EZ
240document and then removing most of the pagination!
241
242WoMan is an Emacs Lisp library that provides an emulation of the
243functionality of the Emacs @code{man} command, the main difference being
244that WoMan does not use any external programs. The only situation in
245which WoMan might use an external program is when the source file is
246compressed, when WoMan will use the standard Emacs automatic
247decompression facility, which does call an external program.
248
249I began developing WoMan in the Spring of 1997 and the first version was
250released in May 1997. The original motivation for WoMan was the fact
a42bec1c
EZ
251that many GNU and Unix programs are ported to other platforms and come
252with Unix-style manual page documentation. This may be difficult to
253read because ports of the Unix-style @code{man} program can be a little
a9212536
EZ
254awkward to set up. I decided that it should not be too hard to emulate
255the 20 @code{man} macros directly, without treating them as macros and
04a623aa 256largely ignoring the underlying @code{roff} requests, given the text
a9212536
EZ
257processing capabilities of Emacs. This proved to be essentially true,
258and it did not take a great deal of work to be able to format simple man
259pages acceptably.
260
261One problem arose with the significant number of man pages that use
04a623aa 262@code{roff} requests in addition to the @code{man} macros, and since
a9212536 263releasing the first version of WoMan I have been continually extending
04a623aa 264it to support more @code{roff} requests. WoMan can now format a
a9212536
EZ
265significant proportion of the man pages that I have tested, either well
266or at least readably. However, I have added capabilities partly by
267making additional passes through the document, a design that is
268fundamentally flawed. This can only be solved by a major re-design of
269WoMan to handle the major formatting within a single recursive pass,
270rather than the present multiple passes without any significant
04a623aa 271recursion. There are some @code{roff} requests that cannot be handled
a9212536 272satisfactorily within the present design. Some of these are currently
df9d7630 273handled by kludges that ``usually more or less work.''
a9212536
EZ
274
275The principle advantage of WoMan is that it does not require @code{man},
df9d7630 276and indeed the name WoMan is a contraction of ``without man.'' But it
a9212536
EZ
277has other advantages. It does not paginate the document, so it does not
278need to un-paginate it again, thereby saving time. It could take full
279advantage of the display capabilities available to it, and I hope to
280develop WoMan to take advantage of developments in Emacs itself. At
281present, WoMan uses several display faces to support bold and italic
282text, to indicate other fonts, etc. The default faces are also
28665d46 283colored, but the choice of faces is customizable. WoMan provides menu
a9212536
EZ
284support for navigation and mouse support for following references, in
285addition to the navigation facilities provided by @code{man} mode.
286WoMan has (this) texinfo documentation!
287
288WoMan @emph{does not} replace @code{man}, although it does use a number
289of the facilities implemented in the Emacs @code{man} library. WoMan
290and man can happily co-exist, which is very useful for comparison and
04a623aa
RS
291debugging purposes.
292
293@code{nroff} simulates non-@acronym{ASCII} characters by using one or more
76dd3692 294@acronym{ASCII} characters. WoMan should be able to do much better than
a9212536
EZ
295this. I have recently begun to add support for WoMan to use more of the
296characters in its default font and to use a symbol font, and it is an
297aspect that I intend to develop further in the near future. It should
04a623aa
RS
298be possible to move WoMan from an emulation of @code{nroff} to an
299emulation of @code{troff} as GNU Emacs moves to providing bit-mapped
a9212536
EZ
300display facilities.
301
04a623aa 302@node Finding, Browsing, Background, Top
a9212536
EZ
303@comment node-name, next, previous, up
304@chapter Finding and Formatting Man Pages
305@cindex using, finding man pages
306@cindex using, formatting man pages
307@cindex finding man pages
308@cindex formatting man pages
309@cindex man pages, finding
310@cindex man pages, formatting
311
312WoMan provides three user interfaces for finding and formatting man pages:
313
314@itemize @bullet
315@item
316a topic interface similar to that provided by the standard Emacs
317@code{man} command;
318
319@item
320a family of filename interfaces analogous to the standard Emacs
321@code{view-file} command;
322
323@item
324an automatic interface that detects the file type from its contents.
325(This is currently neither well tested, well supported nor recommended!)
326@end itemize
327
328The topic and filename interfaces support completion in the usual way.
329
330The topic interface is generally the most convenient for regular use,
331although it may require some special setup, especially if your machine
332does not already have a conventional @code{man} installation (which
333WoMan tries to detect).
334
335The simplest filename interface command @code{woman-find-file} can
336always be used with no setup at all (provided WoMan is installed and
337loaded or set up to autoload).
338
339The automatic interface always requires special setup.
340
341
342@heading Case-Dependence of Filenames
343
344@cindex case-sensitivity
345@vindex w32-downcase-file-names
346By default, WoMan ignores case in file pathnames only when it seems
347appropriate. Microsoft Windows users who want complete case
348independence should set the special NTEmacs variable
349@code{w32-downcase-file-names} to @code{t} and use all lower case when
350setting WoMan file paths.
351
352
353@menu
354* Topic:: Topic Interface
355* Filename:: Filename Interface
356* Automatic:: Automatic Interface
357@end menu
358
359@node Topic, Filename, Finding, Finding
360@comment node-name, next, previous, up
361@section Topic Interface
362@cindex topic interface
363
364The topic interface is accessed principally via the command
365@code{woman}. The same command can be accessed via the menu item
04a623aa
RS
366@samp{Help->Manuals->Read Man Page (WoMan)...} once WoMan has been
367loaded. The command reads a manual topic in the minibuffer, which can
368be the @dfn{basename} of a man file anywhere in the man file
369structure. The ``basename'' in this context means the filename
370without any directory component and without any extension or suffix
371components that relate to the file type. So, for example, if there is
372a compressed source file in Chapter 5 of the UNIX Programmer's Manual
373with the full pathname @file{/usr/local/man/man5/man.conf.5.gz} then
374the topic is @code{man.conf}. Provided WoMan is configured correctly,
375this topic will appear among the completions offered by @code{woman}.
376If more than one file has the same topic name then WoMan will prompt
377for which file to format. Completion of topics is case insensitive.
a9212536
EZ
378
379Clearly, @code{woman} has to know where to look for man files and there
380are two customizable user options that store this information:
381@code{woman-manpath} and @code{woman-path}. @xref{Interface Options, ,
382Interface Options}. If @code{woman-manpath} is not set explicitly then
383WoMan tries to pick up the information that would be used by the
384@code{man} command, as follows. If the environment variable
385@code{MANPATH} is set, which seems to be the standard mechanism under
386UNIX, then WoMan parses that. Otherwise, if WoMan can find a
387configuration file named (by default) @file{man.conf} (or something very
388similar), which seems to be the standard mechanism under GNU/Linux, then
389it parses that. To be precise, ``something very similar'' means having
390two name components separated by a dot and respectively containing
df9d7630 391@samp{man} and beginning with @samp{conf}, e.g.@: @file{manual.configuration}.
a9212536
EZ
392The search path and/or precise full path name for this file are set by
393the value of the customizable user option @code{woman-man.conf-path}.
394If all else fails, WoMan uses a plausible default man search path.
395
396If the above default configuration does not work correctly for any
397reason then simply customize the value of @code{woman-manpath}. To
398access man files that are not in a conventional man file hierarchy,
399customize the value of @code{woman-path} to include the directories
400containing the files. In this way, @code{woman} can access manual files
401@emph{anywhere} in the entire file system.
402
403There are two differences between @code{woman-manpath} and
404@code{woman-path}. Firstly, the elements of @code{woman-manpath} must
405be directories that contain @emph{directories of} man files, whereas the
406elements of @code{woman-path} must be directories that contain man files
407@emph{directly}. Secondly, the last directory component of each element
408of @code{woman-path} is treated as a regular (Emacs) match expression
409rather than a fixed name, which allows collections of related
410directories to be specified succinctly.
411
412For topic completion to work, WoMan must build a list of all the manual
413files that it can access, which can be very slow, especially if a
414network is involved. For this reason, it caches various amounts of
415information, after which retrieving it from the cache is very fast. If
416the cache ever gets out of synchronism with reality, running the
417@code{woman} command with a prefix argument (e.g.@: @kbd{C-u M-x woman})
418will force it to rebuild its cache. This is necessary only if the names
419or locations of any man files change; it is not necessary if only their
420contents change. It would always be necessary if such a change occurred
421whilst Emacs were running and after WoMan has been loaded. It may be
422necessary if such a change occurs between Emacs sessions and persistent
423caching is used, although WoMan can detect some changes that invalidate
424its cache and rebuild it automatically.
425
426Customize the variable @code{woman-cache-filename} to save the cache
427between Emacs sessions. This is recommended only if the @code{woman}
428command is too slow the first time it is run in an Emacs session, while
429it builds its cache in main memory, which @emph{may} be @emph{very}
430slow. @xref{Cache, , The WoMan Topic Cache}, for further details.
431
432
433@menu
434* Cache:: The WoMan Topic Cache
435* Word at point:: Using the ``Word at Point'' as a Topic Suggestion
436@end menu
437
438@node Cache, Word at point, Topic, Topic
439@comment node-name, next, previous, up
440@subsection The WoMan Topic Cache
441@cindex topic cache
442@cindex cache, topic
443
444The amount of information that WoMan caches (in main memory and,
445optionally, saved to disc) is controlled by the user option
446@code{woman-cache-level}. There is a trade-off between the speed with
447which WoMan can find a file and the size of the cache, and the default
448setting gives a reasonable compromise.
449
450The @code{woman} command always performs a certain amount of caching in
451main memory, but it can also write its cache to the filestore as a
452persistent cache under control of the user option
453@code{woman-cache-filename}. If persistent caching is turned on then
454WoMan re-loads its internal cache from the cache file almost
455instantaneously, so that there is never any perceptible start-up delay
456@emph{except} when WoMan rebuilds its cache. Persistent caching is
457currently turned off by default. This is because users with persistent
458caching turned on may overlook the need to force WoMan to rebuild its
459cache the first time they run it after they have installed new man
460files; with persistent caching turned off, WoMan automatically rebuilds
461its cache every time it is run in a new Emacs session.
462
463A prefix argument always causes the @code{woman} command (only) to
464rebuild its topic cache, and to re-save it to
256e6c04 465@code{woman-cache-filename} if this variable has a non-@code{nil} value. This
a9212536
EZ
466is necessary if the @emph{names} of any of the directories or files in
467the paths specified by @code{woman-manpath} or @code{woman-path} change.
468If WoMan user options that affect the cache are changed then WoMan will
469automatically update its cache file on disc (if one is in use) the next
470time it is run in a new Emacs session.
471
472
473@node Word at point, , Cache, Topic
474@comment node-name, next, previous, up
475@subsection Using the ``Word at Point'' as a Topic Suggestion
476@cindex word at point
477@cindex point, word at
478
479By default, the @code{woman} command uses the word nearest to point in
480the current buffer as a suggestion for the topic to look up. The topic
481must be confirmed or edited in the minibuffer. This suggestion can be
482turned off, or @code{woman} can use the suggested topic without
483confirmation if possible, which is controlled by customizing the user
484option @code{woman-topic-at-point} to @code{nil} or @code{t}
485respectively. (Its default value is neither @code{nil} nor @code{t},
486meaning ask for confirmation.)
487
488The variable @code{woman-topic-at-point} can also be rebound locally
489(using @code{let}), which may be useful to provide special private key
490bindings, e.g.@: this key binding for @kbd{C-c w} runs WoMan on the topic
491at point without seeking confirmation:
492
493@lisp
494(global-set-key "\C-cw"
495 (lambda ()
496 (interactive)
497 (let ((woman-topic-at-point t))
498 (woman))))
499@end lisp
500
501
502@node Filename, Automatic, Topic, Finding
503@comment node-name, next, previous, up
504@section Filename Interface
505@cindex filename interface
506
507The commands in this family are completely independent of the topic
508interface, caching mechanism, etc.
509
510@findex woman-find-file
511The filename interface is accessed principally via the extended command
512@code{woman-find-file}, which is available without any configuration at
513all (provided WoMan is installed and loaded or set up to autoload).
514This command can be used to browse any accessible man file, regardless
515of its filename or location. If the file is compressed then automatic
516file decompression must already be turned on (e.g.@: see the
a42bec1c 517@samp{Help->Options} submenu)---it is turned on automatically only by
a9212536
EZ
518the @code{woman} topic interface.
519
520@findex woman-dired-find-file
521Once WoMan is loaded (or if specially set up), various additional
522commands in this family are available. In a dired buffer, the command
523@code{woman-dired-find-file} allows the file on the same line as point
524to be formatted and browsed by WoMan. It is bound to the key @kbd{W} in
525the dired mode map and added to the dired major mode menu. It may also
526be bound to @kbd{w}, unless this key is bound by another library, which
527it is by @code{dired-x}, for example. Because it is quite likely that
528other libraries will extend the capabilities of such a commonly used
529mode as dired, the precise key bindings added by WoMan to the dired mode
530map are controlled by the user option @code{woman-dired-keys}.
531
532@findex woman-tar-extract-file
533When a tar (Tape ARchive) file is visited in Emacs, it is opened in tar
534mode, which parses the tar file and shows a dired-like view of its
535contents. The WoMan command @code{woman-tar-extract-file} allows the
536file on the same line as point to be formatted and browsed by WoMan. It
537is bound to the key @kbd{w} in the tar mode map and added to the tar
538major mode menu.
539
540The command @code{woman-reformat-last-file}, which is bound to the key
541@kbd{R} in WoMan mode and available on the major mode menu, reformats
542the last file formatted by WoMan. This may occasionally be useful if
543formatting parameters, such as the fill column, are changed, or perhaps
544if the buffer is somehow corrupted.
545
546@findex woman-decode-buffer
547The command @code{woman-decode-buffer} can be used to decode and browse
548the current buffer if it is visiting a man file, although it is
549primarily used internally by WoMan.
550
551
552@node Automatic, , Filename, Finding
553@comment node-name, next, previous, up
554@section Automatic Interface
555@cindex automatic interface
556
557Emacs provides an interface to detect automatically the format of a file
558and decode it when it is visited. It is used primarily by the
559facilities for editing rich (i.e.@: formatted) text, as a way to store
76dd3692 560formatting information transparently as @acronym{ASCII} markup. WoMan can in
a9212536
EZ
561principle use this interface, but it must be configured explicitly.
562
563This use of WoMan does not seem to be particularly advantageous, so it
564is not really supported. It originated during early experiments on how
565best to implement WoMan, before I implemented the current topic
566interface, and I subsequently stopped using it. I might revive it as a
567mechanism for storing pre-formatted WoMan files, somewhat analogous to
a42bec1c 568the standard Unix @code{catman} facility. In the meantime, it exists
a9212536
EZ
569for anyone who wants to experiment with it. Once it is set up it is
570simply a question of visiting the file and there is no WoMan-specific
571user interface!
572
573To use it, put something like this in your @file{.emacs} file. [The
574call to @code{set-visited-file-name} is to avoid font-locking triggered
575by automatic major mode selection.]
576
577@lisp
578(autoload 'woman-decode-region "woman")
579
580(add-to-list 'format-alist
a42bec1c 581 '(man "Unix man-page source format" "\\.\\(TH\\|ig\\) "
a9212536
EZ
582 woman-decode-region nil nil
583 (lambda (arg)
584 set-visited-file-name
585 (file-name-sans-extension buffer-file-name))))
586@end lisp
587
588@c ===================================================================
589
590@node Browsing, Customization, Finding, Top
591@comment node-name, next, previous, up
592@chapter Browsing Man Pages
593@cindex using, browsing man pages
594@cindex browsing man pages
595@cindex man pages, browsing
596
597Once a man page has been found and formatted, WoMan provides a browsing
598interface that is essentially the same as that provided by the standard
599Emacs @code{man} command (and much of the code is inherited from the
600@code{man} library, which WoMan currently requires). Many WoMan
601facilities can be accessed from the WoMan major mode menu as well as via
602key bindings, etc.
603
604WoMan does not produce any page breaks or page numbers, and in fact does
605not paginate the man page at all, since this is not appropriate for
606continuous online browsing. It produces a document header line that is
607constructed from the standard man page header and footer. Apart from
608that, the appearance of the formatted man page should be almost
609identical to what would be produced by @code{man}, with consecutive
610blank lines squeezed to a single blank line.
611
612@menu
613* Fonts:: Fonts and Faces
614* Navigation:: Navigation
615* References:: Following References
616* Changing:: Changing the Current Man Page
617* Convenience:: Convenience Key Bindings
618* Imenu:: Imenu Support; Contents Menu
619@end menu
620
621@node Fonts, Navigation, Browsing, Browsing
622@comment node-name, next, previous, up
623@section Fonts and Faces
624@cindex fonts
625@cindex faces
626
04a623aa 627Fonts used by @code{roff} are handled by WoMan as faces, the details of
a9212536
EZ
628which are customizable. @xref{Faces, , Faces}. WoMan supports both the
629italic and bold fonts normally used in man pages, together with a single
630face to represent all unknown fonts (which are occasionally used in
631``non-standard'' man pages, usually to represent a ``typewriter'' font)
632and a face to indicate additional symbols introduced by WoMan. This
633currently means the characters ^ and _ used to indicate super- and
634sub-scripts, which are not displayed well by WoMan.
635
636
637@node Navigation, References, Fonts, Browsing
638@comment node-name, next, previous, up
639@section Navigation
640@cindex navigation
641
642Man (and hence WoMan) mode can be thought of as a superset of view mode.
643The buffer cannot be edited, so keys that would normally self-insert are
644used for navigation. The WoMan key bindings are a minor modification of
645the @code{man} key bindings.
646
647@table @kbd
648@item @key{SPC}
649@kindex SPC
650@findex scroll-up
651Scroll the man page up the window (@code{scroll-up}).
652
653@item @key{DEL}
654@kindex DEL
655@findex scroll-down
656Scroll the man page down the window (@code{scroll-down}).
657
658@item n
659@kindex n
660@findex Man-next-section
a42bec1c 661Move point to the Nth next section---default 1 (@code{Man-next-section}).
a9212536
EZ
662
663@item p
664@kindex p
665@findex Man-previous-section
a42bec1c 666Move point to Nth previous section---default 1
a9212536
EZ
667(@code{Man-previous-section}).
668
669@item g
670@kindex g
671@findex Man-goto-section
672Move point to the specified section (@code{Man-goto-section}).
673
674@item s
675@kindex s
676@findex Man-goto-see-also-section
677Move point to the ``SEE ALSO'' section
678(@code{Man-goto-see-also-section}). Actually the section moved to is
679described by @code{Man-see-also-regexp}.
680@end table
681
682
683@node References, Changing, Navigation, Browsing
684@comment node-name, next, previous, up
685@section Following References
686@cindex following references
687@cindex references
688
689Man pages usually contain a ``SEE ALSO'' section containing references
690to other man pages. If these man pages are installed then WoMan can
691easily be directed to follow the reference, i.e.@: to find and format the
692man page. When the mouse is passed over a correctly formatted reference
693it is highlighted, in which case clicking the middle button
df9d7630 694@kbd{Mouse-2} will cause WoMan to follow the reference. Alternatively,
a9212536
EZ
695when point is over such a reference the key @key{RET} will follow the
696reference.
697
698Any word in the buffer can be used as a reference by clicking
df9d7630 699@kbd{Mouse-2} over it provided the Meta key is also used (although in
a9212536
EZ
700general such a ``reference'' will not lead to a man page).
701Alternatively, the key @kbd{r} allows completion to be used to select a
702reference to follow, based on the word at point as default.
703
704@table @kbd
df9d7630
RS
705@item @kbd{Mouse-2}
706@kindex Mouse-2
a9212536
EZ
707@findex woman-mouse-2
708Run WoMan with word under mouse as topic (@code{woman-mouse-2}). The
709word must be mouse-highlighted unless @code{woman-mouse-2} is used with
710the Meta key.
711
712@item @key{RET}
713@kindex RET
714@findex man-follow
715Get the man page for the topic under (or nearest to) point
716(@code{man-follow}).
717
718@item r
719@kindex r
720@findex Man-follow-manual-reference
721Get one of the man pages referred to in the ``SEE ALSO'' section
722(@code{Man-follow-manual-reference}). Specify which reference to use;
723default is based on word at point.
724@end table
725
726
727@node Changing, Convenience, References, Browsing
728@comment node-name, next, previous, up
729@section Changing the Current Man Page
730@cindex changing current man page
731@cindex current man page, changing
732
733The man page currently being browsed by WoMan can be changed in several
734ways. The command @code{woman} can be invoked to format another man
735page, or the current WoMan buffer can be buried or killed. WoMan
736maintains a ring of formatted man pages, and it is possible to move
737forwards and backwards in this ring by moving to the next or previous
738man page. It is sometimes useful to reformat the current page, for
739example after the right margin (the wrap column) or some other
740formatting parameter has been changed.
741
742Buffers formatted by Man and WoMan are completely unrelated, even though
743some of the commands to manipulate them are superficially the same (and
744share code).
745
746@table @kbd
747@item m
748@kindex m
749@findex man
750Run the command @code{man} to get a Un*x manual page and put it in a
751buffer. This command is the top-level command in the man package. It
752runs a Un*x command to retrieve and clean a man page in the background
753and places the results in a Man mode (man page browsing) buffer. If a
754man buffer already exists for this man page, it will display
755immediately. This works exactly the same if WoMan is loaded, except
756that the formatting time is displayed in the mini-buffer.
757
758@item w
759@kindex w
760@findex woman
761Run the command @code{woman} exactly as if the extended command or menu
762item had been used.
763
764@item q
765@kindex q
766@findex Man-quit
767Bury the buffer containing the current man page (@code{Man-quit}),
768i.e.@: move it to the bottom of the buffer stack.
769
770@item k
771@kindex k
772@findex Man-kill
773Kill the buffer containing the current man page (@code{Man-kill}),
774i.e.@: delete it completely so that it can be retrieved only by formatting
775the page again.
776
777@item M-p
778@kindex M-p
779@findex WoMan-previous-manpage
780Find the previous WoMan buffer (@code{WoMan-previous-manpage}).
781
782@item M-n
783@kindex M-n
784@findex WoMan-next-manpage
785Find the next WoMan buffer (@code{WoMan-next-manpage}).
786
787@item R
788@kindex R
789@findex woman-reformat-last-file
790Call WoMan to reformat the last man page formatted by WoMan
791(@code{woman-reformat-last-file}), e.g.@: after changing the fill column.
792@end table
793
794
795@node Convenience, Imenu, Changing, Browsing
796@comment node-name, next, previous, up
797@section Convenience Key Bindings
798@cindex convenience key bindings
799@cindex key bindings, convenience
800
801@table @kbd
802@item -
803@kindex -
804@findex negative-argument
805Begin a negative numeric argument for the next command
806(@code{negative-argument}).
807
808@item 0 .. 9
809@kindex 0 .. 9
810@findex digit-argument
811Part of the numeric argument for the next command
812(@code{digit-argument}).
813
814@item <
815@kindex <
816@itemx .
817@kindex .
818@findex beginning-of-buffer
819Move point to the beginning of the buffer; leave mark at previous
820position (@code{beginning-of-buffer}).
821
822@item >
823@kindex >
824@findex end-of-buffer
825Move point to the end of the buffer; leave mark at previous position
826(@code{end-of-buffer}).
827
828@item ?
829@kindex ?
830@findex describe-mode
831Display documentation of current major mode and minor modes
832(@code{describe-mode}). The major mode description comes first,
833followed by the minor modes, each on a separate page.
834@end table
835
836
837@node Imenu, , Convenience, Browsing
838@comment node-name, next, previous, up
839@section Imenu Support; Contents Menu
840@cindex imenu support
841@cindex contents menu
842
843The WoMan menu provides an option to make a contents menu for the
844current man page (using @code{imenu}). Alternatively, if you customize
845the option @code{woman-imenu} to @code{t} then WoMan will do it
846automatically for every man page. The menu title is set by the option
847@code{woman-imenu-title}, which is ``CONTENTS'' by default. The menu
848shows manual sections and subsections by default, but you can change
849this by customizing @code{woman-imenu-generic-expression}.
850
851WoMan is configured not to replace spaces in an imenu
852@code{*Completion*} buffer. For further documentation on the use of
853imenu, such as menu sorting, see the source file @file{imenu.el}, which
854is distributed with GNU Emacs.
855
856@c ===================================================================
857
858@node Customization, Log, Browsing, Top
859@comment node-name, next, previous, up
860@chapter Customization
861@cindex customization
862
04a623aa
RS
863All WoMan user options are customizable, and it is recommended to
864change them only via the standard Emacs customization facilities.
865WoMan defines a top-level customization group called @code{WoMan}
866under the parent group @code{Help}. It can be accessed either via the
867standard Emacs facilities, e.g.@: via the @samp{Help->Customize}
868submenu, or via the WoMan major mode menu.
a9212536
EZ
869
870The top-level WoMan group contains only a few general options and three
871subgroups. The hooks are provided only for special purposes that, for
872example, require code to be executed, and should be changed only via
873@code{Customization} or the function @code{add-hook}. Most
874customization should be possible via existing user options.
875
876@vtable @code
877@item woman-show-log
256e6c04 878A boolean value that defaults to @code{nil}. If non-@code{nil} then show the
a9212536
EZ
879@code{*WoMan-Log*} buffer if appropriate, i.e.@: if any warning messages
880are written to it. @xref{Log, , The *WoMan-Log* Buffer}.
881
882@item woman-pre-format-hook
883A hook run immediately before formatting a buffer. It might, for
884example, be used for face customization. @xref{Faces, , Faces},
885however.
886
887@item woman-post-format-hook
888A hook run immediately after formatting a buffer. It might, for
889example, be used for installing a dynamic menu using @code{imenu}.
890(However. in this case it is better to use the built-in WoMan
891@code{imenu} support. @xref{Imenu, , Imenu Support; Contents Menu}.)
892@end vtable
893
894@heading Customization Subgroups
895
896@table @code
897@item WoMan Interface
898These options control the process of locating the appropriate file to
899browse, and the appearance of the browsing interface.
900
901@item WoMan Formatting
902These options control the layout that WoMan uses to format the man page.
903
904@item WoMan Faces
905These options control the display faces that WoMan uses to format the
906man page.
907@end table
908
909@menu
910* Interface Options::
911* Formatting Options::
912* Faces::
913* Special symbols::
914@end menu
915
916@node Interface Options, Formatting Options, Customization, Customization
917@comment node-name, next, previous, up
918@section Interface Options
919@cindex interface options
920
921These options control the process of locating the appropriate file to
922browse, and the appearance of the browsing interface.
923
924@vtable @code
925@item woman-man.conf-path
926A list of strings representing directories to search and/or files to try
927for a man configuration file. The default is
928
929@lisp
930("/etc" "/usr/local/lib")
931@end lisp
932
933@noindent
934[for GNU/Linux and Cygwin respectively.] A trailing separator (@file{/}
935for UNIX etc.) on directories is optional and the filename matched if a
936directory is specified is the first to match the regexp
937@code{man.*\.conf}. If the environment variable @code{MANPATH} is not
938set but a configuration file is found then it is parsed instead (or as
939well) to provide a default value for @code{woman-manpath}.
940
941@item woman-manpath
a42bec1c 942A list of strings representing @emph{directory trees} to search for Unix
a9212536
EZ
943manual files. Each element should be the name of a directory that
944contains subdirectories of the form @file{man?}, or more precisely
945subdirectories selected by the value of @code{woman-manpath-man-regexp}.
946Non-directory and unreadable files are ignored.
947
948@cindex @code{MANPATH}, environment variable
949If not set then the environment variable @code{MANPATH} is used. If no
950such environment variable is found, the default list is determined by
951consulting the man configuration file if found. By default this is
952expected to be either @file{/etc/man.config} or
953@file{/usr/local/lib/man.conf}, which is controlled by the user option
954@code{woman-man.conf-path}. An empty substring of @code{MANPATH}
955denotes the default list. Otherwise, the default value of this variable
956is
957
958@lisp
959("/usr/man" "/usr/local/man")
960@end lisp
961
a42bec1c 962Any environment variables (names of which must have the Unix-style form
a9212536
EZ
963@code{$NAME}, e.g.@: @code{$HOME}, @code{$EMACSDATA}, @code{$EMACS_DIR},
964regardless of platform) are evaluated first but each element must
965evaluate to a @emph{single} directory name. Trailing @file{/}s are
966ignored. (Specific directories in @code{woman-path} are also searched.)
967
968On Microsoft platforms I recommend including drive letters explicitly,
969e.g.
970
971@lisp
972("C:/Cygwin/usr/man" "C:/usr/man" "C:/usr/local/man")
973@end lisp
974
975@cindex directory separator character
976@cindex @code{MANPATH}, directory separator
977The @code{MANPATH} environment variable may be set using DOS
a42bec1c 978semi-colon-separated or Unix-style colon-separated syntax (but not
a9212536
EZ
979mixed).
980
981@item woman-manpath-man-regexp
982A regular expression to match man directories @emph{under} the
983@code{woman-manpath} directories. These normally have names of the form
984@file{man?}. Its default value is @code{"[Mm][Aa][Nn]"}, which is
985case-insensitive mainly for the benefit of Microsoft platforms. Its
986purpose is to avoid directories such as @file{cat?}, @file{.},
987@file{..}, etc.
988
989@item woman-path
990A list of strings representing @emph{specific directories} to search for
a42bec1c 991Unix manual files. For example
a9212536
EZ
992
993@lisp
994("/emacs/etc")
995@end lisp
996
997These directories are searched in addition to the directory trees
998specified in @code{woman-manpath}. Each element should be a directory
999string or @code{nil}, which represents the current directory when the
1000path is expanded and cached. However, the last component (only) of each
1001directory string is treated as a regexp (Emacs, not shell) and the
1002string is expanded into a list of matching directories. Non-directory
1003and unreadable files are ignored. The default value on MS-DOS is
1004
1005@lisp
1006("$DJDIR/info" "$DJDIR/man/cat[1-9onlp]")
1007@end lisp
1008
1009@noindent
1010and on other platforms is @code{nil}.
1011
a42bec1c 1012Any environment variables (names of which must have the Unix-style form
a9212536
EZ
1013@code{$NAME}, e.g.@: @code{$HOME}, @code{$EMACSDATA}, @code{$EMACS_DIR},
1014regardless of platform) are evaluated first but each element must
1015evaluate to a @emph{single} directory name (regexp, see above). For
1016example
1017
1018@lisp
1019("$EMACSDATA")
1020@end lisp
1021
1022@noindent
1023or equivalently
1024
1025@lisp
1026("$EMACS_DIR/etc")
1027@end lisp
1028
1029@noindent
1030Trailing @file{/}s are discarded. (The directory trees in
1031@code{woman-manpath} are also searched.) On Microsoft platforms I
1032recommend including drive letters explicitly.
1033
1034@item woman-cache-level
1035A positive integer representing the level of topic caching:
1036
1037@enumerate
1038@item
1039cache only the topic and directory lists (uses minimal memory, but not
1040recommended);
1041@item
1042cache also the directories for each topic (faster, without using much
1043more memory);
1044@item
1045cache also the actual filenames for each topic (fastest, but uses twice
1046as much memory).
1047@end enumerate
1048
1049The default value is currently 2, a good general compromise. If the
1050@code{woman} command is slow to find files then try 3, which may be
1051particularly beneficial with large remote-mounted man directories. Run
1052the @code{woman} command with a prefix argument or delete the cache file
1053@code{woman-cache-filename} for a change to take effect. (Values < 1
1054behave like 1; values > 3 behave like 3.)
1055
1056@item woman-cache-filename
1057Either a string representing the full pathname of the WoMan directory
1058and topic cache file, or @code{nil}. It is used to save and restore the
1059cache between Emacs sessions. This is especially useful with
1060remote-mounted man page files! The default value of @code{nil}
256e6c04 1061suppresses this action. The ``standard'' non-@code{nil} filename is
a9212536
EZ
1062@file{~/.wmncach.el}. Remember that a prefix argument forces the
1063@code{woman} command to update and re-write the cache.
1064
1065@item woman-dired-keys
1066A list of @code{dired} mode keys to be defined to run WoMan on the
256e6c04 1067current file, e.g.@: @code{("w" "W")} or any non-@code{nil} atom to
a9212536
EZ
1068automatically define @kbd{w} and @kbd{W} if they are unbound, or
1069@code{nil} to do nothing. Default is @code{t}.
1070
1071@item woman-imenu-generic-expression
1072Imenu support for Sections and Subsections: an alist with elements of
a42bec1c 1073the form @code{(MENU-TITLE REGEXP INDEX)}---see the documentation for
a9212536
EZ
1074@code{imenu-generic-expression}. Default value is
1075
1076@lisp
1077((nil "\n\\([A-Z].*\\)" 1) ; SECTION, but not TITLE
1078 ("*Subsections*" "^ \\([A-Z].*\\)" 1))
1079@end lisp
1080
1081@item woman-imenu
256e6c04 1082A boolean value that defaults to @code{nil}. If non-@code{nil} then WoMan adds
a9212536
EZ
1083a Contents menu to the menubar by calling @code{imenu-add-to-menubar}.
1084
1085@item woman-imenu-title
1086A string representing the title to use if WoMan adds a Contents menu to
1087the menubar. Default is @code{"CONTENTS"}.
1088
1089@item woman-topic-at-point
1090A symbol, which may be either @code{t}, @code{nil} or @code{confirm},
1091that controls the use by @code{woman} of the ``word at point'' as a
256e6c04 1092topic suggestion. If it is non-@code{nil} then the @code{woman} command uses
a9212536
EZ
1093the word at point as an initial topic suggestion when it reads a topic
1094from the minibuffer; if it is @code{t} then @code{woman} uses the word
1095at point @emph{without interactive confirmation} if it exists as a
1096topic. The value @code{confirm} means suggest a topic and ask for
1097confirmation. The default value is that of
1098@code{woman-topic-at-point-default}.
1099
1100@item woman-topic-at-point-default
1101A symbol, which may be either @code{t}, @code{nil} or @code{confirm},
1102representing the default value for @code{woman-topic-at-point}. The
1103default value is @code{confirm}. [The variable
1104@code{woman-topic-at-point} may be @code{let}-bound when @code{woman} is
1105loaded, in which case its global value does not get defined. The
1106function @code{woman-file-name} sets it to this value if it is unbound.]
1107
1108@item woman-uncompressed-file-regexp
1109A regular match expression used to select man source files (ignoring any
1110compression extension). The default value is
1111@code{"\\.\\([0-9lmnt]\\w*\\)"} [which means a filename extension is
1112required].
1113
1114@emph{Do not change this unless you are sure you know what you are doing!}
1115
1116The SysV standard man pages use two character suffixes, and this is
1117becoming more common in the GNU world. For example, the man pages in
1118the @code{ncurses} package include @file{toe.1m}, @file{form.3x}, etc.
1119
bab5541b
RS
1120@strong{Please note:} an optional compression regexp will be appended,
1121so this regexp @emph{must not} end with any kind of string terminator
1122such as @code{$} or @code{\\'}.
a9212536
EZ
1123
1124@item woman-file-compression-regexp
1125A regular match expression used to match compressed man file extensions
1126for which decompressors are available and handled by auto-compression
1127mode. It should begin with @code{\\.} and end with @code{\\'} and
1128@emph{must not} be optional. The default value is
1129@code{"\\.\\(g?z\\|bz2\\)\\'"}, which matches the @code{gzip} and
1130@code{bzip2} compression extensions.
1131
1132@emph{Do not change this unless you are sure you know what you are doing!}
1133
1134[It should be compatible with the @code{car} of
1135@code{jka-compr-file-name-handler-entry}, but that is unduly
1136complicated, includes an inappropriate extension (@file{.tgz}) and is
1137not loaded by default!]
1138
1139@item woman-use-own-frame
256e6c04 1140If non-@code{nil} then use a dedicated frame for displaying WoMan windows.
a9212536
EZ
1141This is useful only when WoMan is run under a window system such as X or
1142Microsoft Windows that supports real multiple frames, in which case the
256e6c04 1143default value is non-@code{nil}.
a9212536
EZ
1144@end vtable
1145
1146
1147@node Formatting Options, Faces, Interface Options, Customization
1148@comment node-name, next, previous, up
1149@section Formatting Options
1150@cindex formatting options
1151
1152These options control the layout that WoMan uses to format the man page.
1153
1154@vtable @code
1155@item woman-fill-column
1156An integer specifying the right margin for formatted text. Default is
115765.
1158
1159@item woman-fill-frame
256e6c04
RS
1160A boolean value. If non-@code{nil} then most of the frame width is used,
1161overriding the value of @code{woman-fill-column}. Default is @code{nil}.
a9212536
EZ
1162
1163@item woman-default-indent
1164An integer specifying the default prevailing indent for the @code{-man}
256e6c04 1165macros. Default is 5. Set this variable to 7 to emulate GNU/Linux man
a9212536
EZ
1166formatting.
1167
1168@item woman-bold-headings
256e6c04
RS
1169A boolean value. If non-@code{nil} then embolden section and subsection
1170headings. Default is @code{t}. [Heading emboldening is @emph{not} standard
28665d46 1171@code{man} behavior.]
a9212536
EZ
1172
1173@item woman-ignore
256e6c04 1174A boolean value. If non-@code{nil} then unrecognised requests etc. are
04a623aa 1175ignored. Default is @code{t}. This gives the standard @code{roff} behavior.
a9212536
EZ
1176If @code{nil} then they are left in the buffer, which may aid debugging.
1177
1178@item woman-preserve-ascii
76dd3692
EZ
1179A boolean value. If non-@code{nil} then preserve @acronym{ASCII} characters in the
1180WoMan buffer. Otherwise, non-@acronym{ASCII} characters (that display as
1181@acronym{ASCII}) may remain, which is irrelevant unless the buffer is to be
256e6c04 1182saved to a file. Default is @code{nil}.
a9212536
EZ
1183
1184@item woman-emulation
04a623aa
RS
1185WoMan emulation, currently either @code{nroff} or @code{troff}. Default
1186is @code{nroff}. @code{troff} emulation is experimental and largely
a9212536
EZ
1187untested.
1188@end vtable
1189
1190
1191@node Faces, Special symbols, Formatting Options, Customization
1192@comment node-name, next, previous, up
1193@section Faces
1194@cindex faces
1195
1196These options control the display faces that WoMan uses to format the
1197man page.
1198
1199@vtable @code
1200@item woman-fontify
256e6c04
RS
1201A boolean value. If non-@code{nil} then WoMan assumes that face support is
1202available. It defaults to a non-@code{nil} value if the display supports
28665d46 1203either colors or different fonts.
a9212536
EZ
1204
1205@item woman-italic-face
1206Face for italic font in man pages. Default: italic, underlined,
04a623aa
RS
1207foreground red. This is overkill! @code{troff} uses just italic;
1208@code{nroff} uses just underline. You should probably select either
a9212536
EZ
1209italic or underline as you prefer, but not both, although italic and
1210underline work together perfectly well!
1211
1212@item woman-bold-face
1213Face for bold font in man pages. Default: bold, foreground blue.
1214
1215@item woman-unknown-face
1216Face for all unknown fonts in man pages. Default: foreground brown.
1217Brown is a good compromise: it is distinguishable from the default but
1218not enough so as to make font errors look terrible. (Files that use
1219non-standard fonts seem to do so badly or in idiosyncratic ways!)
1220
1221@item woman-addition-face
1222Face for all additions made by WoMan to man pages.
1223Default: foreground orange.
1224@end vtable
1225
1226
1227@node Special symbols, , Faces, Customization
1228@comment node-name, next, previous, up
1229@section Special symbols
1230@cindex special symbols
1231
1232This section currently applies @emph{only} to Microsoft Windows.
1233
1234WoMan provides partial experimental support for special symbols,
1235initially only for MS-Windows and only for MS-Windows fonts. This
76dd3692 1236includes both non-@acronym{ASCII} characters from the main text font and use
a9212536
EZ
1237of a separate symbol font. Later, support will be added for other font
1238types (e.g.@: @code{bdf} fonts) and for the X Window System. In Emacs
123920.7, the current support works partially under Windows 9x but may not
1240work on any other platform.
1241
1242@vtable @code
1243@item woman-use-extended-font
76dd3692 1244A boolean value. If non-@code{nil} then WoMan may use non-@acronym{ASCII} characters
a9212536
EZ
1245from the default font. Default is @code{t}.
1246
1247@item woman-use-symbol-font
256e6c04 1248A boolean value. If non-@code{nil} then WoMan may use the symbol font.
a9212536
EZ
1249Default is @code{nil}, mainly because it may change the line spacing (at
1250least in NTEmacs 20).
1251
1252@item woman-symbol-font
1253A string describing the symbol font to use for special characters.
1254It should be compatible with, and the same size as, the default text font.
1255Under MS-Windows, the default is
1256
1257@lisp
1258"-*-Symbol-normal-r-*-*-*-*-96-96-p-*-ms-symbol"
1259@end lisp
1260@end vtable
1261
1262
1263@c ===================================================================
1264
1265@node Log, Technical, Customization, Top
1266@comment node-name, next, previous, up
1267@chapter The *WoMan-Log* Buffer
1268@cindex log buffer
1269@cindex buffer, log
1270
28665d46 1271This is modeled on the Emacs byte-compiler. It logs all files
a9212536
EZ
1272formatted by WoMan and the time taken. If WoMan finds anything that it
1273cannot handle then it writes a warning to this buffer. If the variable
256e6c04 1274@code{woman-show-log} is non-@code{nil} (by default it is @code{nil}) then
a9212536
EZ
1275WoMan automatically displays this buffer. @xref{Interface Options, ,
1276Interface Options}. Many WoMan warnings can be completely ignored,
1277because they are reporting the fact that WoMan has ignored requests that
1278it is correct for WoMan to ignore. In some future version this level of
1279paranoia may be reduced, but not until WoMan is deemed more reliable.
1280At present, all warnings should be treated with some suspicion.
1281Uninterpreted escape sequences are also logged (in some cases).
1282
1283By resetting the variable @code{woman-ignore} to @code{nil} (by default
04a623aa 1284it is @code{t}), uninterpreted @code{roff} requests can optionally be
a9212536
EZ
1285left in the formatted buffer to indicate precisely where they occurred.
1286@xref{Interface Options, , Interface Options}.
1287
1288@c ===================================================================
1289
1290@node Technical, Bugs, Log, Top
1291@comment node-name, next, previous, up
1292@chapter Technical Details
1293@cindex technical details
1294@cindex horizontal spacing
1295@cindex spacing, horizontal and vertical
1296@cindex vertical spacing
1297@cindex resolution
1298
1299@heading Horizontal and vertical spacing and resolution
1300
1301WoMan currently assumes 10 characters per inch horizontally, hence a
1302horizontal resolution of 24 basic units, and 5 lines per inch
1303vertically, hence a vertical resolution of 48 basic units.
04a623aa 1304(@code{nroff} uses 240 per inch.)
a9212536
EZ
1305
1306@heading Vertical spacing and blank lines
1307
1308The number of consecutive blank lines in the formatted buffer should be
1309either 0 or 1. A blank line should leave a space like .sp 1.
1310Current policy is to output vertical space only immediately before text
1311is output.
1312
1313@c ===================================================================
1314
1315@node Bugs, Acknowledgements, Technical, Top
1316@comment node-name, next, previous, up
1317@chapter Reporting Bugs
1318@cindex reporting bugs
1319@cindex bugs, reporting
1320
1321If WoMan fails completely, or formats a file incorrectly (i.e.@:
1322obviously wrongly or significantly differently from @code{man}) or
1323inelegantly, then please
1324
5aa3f2be 1325@enumerate
a9212536 1326@item
5aa3f2be
RS
1327try the latest version of @file{woman.el} from the Emacs CVS repository
1328on @uref{http://savannah.gnu.org/}. If it still fails, please
a9212536
EZ
1329
1330@item
5aa3f2be
RS
1331send a bug report to @email{bug-gnu-emacs@@gnu.org} and to
1332@email{F.J.Wright@@qmw.ac.uk}. Please include the entry from the
1333@code{*WoMan-Log*} buffer relating to the problem file, together with
1334a brief description of the problem. Please indicate where you got the
1335man source file from, but do not send it unless asked to send it.
a9212536
EZ
1336@end enumerate
1337
a9212536
EZ
1338@c ===================================================================
1339
1340@node Acknowledgements, Command Index, Bugs, Top
1341@comment node-name, next, previous, up
1342@chapter Acknowledgements
1343@cindex acknowledgements
1344
1345For Heather, Kathryn and Madelyn, the women in my life (although they
1346will probably never use it)!
1347
1348I also thank the following for helpful suggestions, bug reports, code
1349fragments, general interest, etc.:
1350
1351@quotation
1352Jari Aalto, @email{jari.aalto@@cs.tpu.fi}@*
1353Dean Andrews, @email{dean@@dra.com}@*
1354Juanma Barranquero, @email{barranquero@@laley-actualidad.es}@*
1355Karl Berry, @email{kb@@cs.umb.edu}@*
1356Jim Chapman, @email{jchapman@@netcomuk.co.uk}@*
1357Frederic Corne, @email{frederic.corne@@erli.fr}@*
1358Peter Craft, @email{craft@@alacritech.com}@*
1359Charles Curley, @email{ccurley@@trib.com}@*
1360Jim Davidson, @email{jdavidso@@teknowledge.com}@*
1361Kevin D'Elia, @email{Kevin.DElia@@mci.com}@*
1362John Fitch, @email{jpff@@maths.bath.ac.uk}@*
1363Hans Frosch, @email{jwfrosch@@rish.b17c.ingr.com}@*
1364Guy Gascoigne-Piggford, @email{ggp@@informix.com}@*
1365Brian Gorka, @email{gorkab@@sanchez.com}@*
1366Nicolai Henriksen, @email{nhe@@lyngso-industri.dk}@*
1367Thomas Herchenroeder, @email{the@@software-ag.de}@*
1368Alexander Hinds, @email{ahinds@@thegrid.net}@*
1369Stefan Hornburg, @email{sth@@hacon.de}@*
1370Theodore Jump, @email{tjump@@cais.com}@*
1371Paul Kinnucan, @email{paulk@@mathworks.com}@*
1372Jonas Linde, @email{jonas@@init.se}@*
1373Andrew McRae, @email{andrewm@@optimation.co.nz}@*
1374Howard Melman, @email{howard@@silverstream.com}@*
1375Dennis Pixton, @email{dennis@@math.binghamton.edu}@*
1376T. V. Raman, @email{raman@@Adobe.com}@*
1377Bruce Ravel, @email{bruce.ravel@@nist.gov}@*
1378Benjamin Riefenstahl, @email{benny@@crocodial.de}@*
1379Kevin Ruland, @email{kruland@@seistl.com}@*
1380Tom Schutter, @email{tom@@platte.com}@*
1381Wei-Xue Shi, @email{wxshi@@ma.neweb.ne.jp}@*
1382Fabio Somenzi, @email{fabio@@joplin.colorado.edu}@*
1383Karel Sprenger, @email{ks@@ic.uva.nl}@*
1384Chris Szurgot, @email{szurgot@@itribe.net}@*
1385Paul A. Thompson, @email{pat@@po.cwru.edu}@*
1386Arrigo Triulzi, @email{arrigo@@maths.qmw.ac.uk}@*
1387Geoff Voelker, @email{voelker@@cs.washington.edu}@*
1388Eli Zaretskii, @email{eliz@@is.elta.co.il}
1389@end quotation
1390
1391@c ===================================================================
1392
1393@comment END OF MANUAL TEXT
1394@page
1395
1396@node Command Index, Variable Index, Acknowledgements, Top
1397@comment node-name, next, previous, up
1398@unnumbered Command Index
1399
1400@printindex fn
1401
1402@node Variable Index, Keystroke Index, Command Index, Top
1403@comment node-name, next, previous, up
1404@unnumbered Variable Index
1405
1406@printindex vr
1407
1408@c Without a page throw here, the page length seems to get reset to the
1409@c depth of the index that fits on the page after the previous index.
1410@c This must be a bug!
1411
1412@page
1413
1414@node Keystroke Index, Concept Index, Variable Index, Top
1415@comment node-name, next, previous, up
1416@unnumbered Keystroke Index
1417
1418@printindex ky
1419
1420@c Without a page throw here, the page length seems to get reset to the
1421@c depth of the index that fits on the page after the previous index.
1422@c This must be a bug!
1423
1424@page
1425
1426@node Concept Index, , Keystroke Index, Top
1427@comment node-name, next, previous, up
1428@unnumbered Concept Index
1429
1430@printindex cp
1431
1432@bye
ab5796a9
MB
1433
1434@ignore
1435 arch-tag: a1a6b715-396f-4378-9b94-0b2ca0aa5028
1436@end ignore