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