diff options
| author | Richard M. Stallman | 2006-10-27 11:58:29 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2006-10-27 11:58:29 +0000 |
| commit | 04a623aac6c05b968557c441bae5b0eb3871940a (patch) | |
| tree | 967894e0b6477422075f106fe7df0782cc92d0fe | |
| parent | 6655e16dbae8383069326d5ac276cad4925649e2 (diff) | |
| download | emacs-04a623aac6c05b968557c441bae5b0eb3871940a.tar.gz emacs-04a623aac6c05b968557c441bae5b0eb3871940a.zip | |
Downcase nroff/troff/roff.
(Installation): Chapter deleted. Some xrefs deleted.
(Background): woman doesn't advise man ;-).
| -rw-r--r-- | man/ChangeLog | 6 | ||||
| -rw-r--r-- | man/woman.texi | 324 |
2 files changed, 61 insertions, 269 deletions
diff --git a/man/ChangeLog b/man/ChangeLog index 2ab51310031..c46f1c1161a 100644 --- a/man/ChangeLog +++ b/man/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2006-10-27 Richard Stallman <rms@gnu.org> | ||
| 2 | |||
| 3 | * woman.texi: Downcase nroff/troff/roff. | ||
| 4 | (Installation): Chapter deleted. Some xrefs deleted. | ||
| 5 | (Background): woman doesn't advise man ;-). | ||
| 6 | |||
| 1 | 2006-10-26 Roberto Rodr,Am(Bguez <lanubeblanca@googlemail.com> (tiny change) | 7 | 2006-10-26 Roberto Rodr,Am(Bguez <lanubeblanca@googlemail.com> (tiny change) |
| 2 | 8 | ||
| 3 | * ada-mode.texi (Project files, Identifier completion) | 9 | * ada-mode.texi (Project files, Identifier completion) |
diff --git a/man/woman.texi b/man/woman.texi index 70e7974b16f..0d782fd4416 100644 --- a/man/woman.texi +++ b/man/woman.texi | |||
| @@ -91,7 +91,6 @@ Mile End Road, London E1 4NS, UK | |||
| 91 | @menu | 91 | @menu |
| 92 | * Introduction:: Introduction | 92 | * Introduction:: Introduction |
| 93 | * Background:: Background | 93 | * Background:: Background |
| 94 | * Installation:: Installation and Setup | ||
| 95 | * Finding:: Finding and Formatting Man Pages | 94 | * Finding:: Finding and Formatting Man Pages |
| 96 | * Browsing:: Browsing Man Pages | 95 | * Browsing:: Browsing Man Pages |
| 97 | * Customization:: Customization | 96 | * Customization:: Customization |
| @@ -127,7 +126,7 @@ WoMan implements a subset of the formatting performed by the Emacs | |||
| 127 | @code{man} (or @code{manual-entry}) command to format a Unix-style | 126 | @code{man} (or @code{manual-entry}) command to format a Unix-style |
| 128 | @dfn{manual page} (usually abbreviated to @dfn{man page}) for display, | 127 | @dfn{manual page} (usually abbreviated to @dfn{man page}) for display, |
| 129 | but without calling any external programs. It is intended to emulate | 128 | but without calling any external programs. It is intended to emulate |
| 130 | the whole of the @code{ROFF -man} macro package, plus those @code{ROFF} | 129 | the whole of the @code{roff -man} macro package, plus those @code{roff} |
| 131 | requests (@pxref{Background, , Background}) that are most commonly used | 130 | requests (@pxref{Background, , Background}) that are most commonly used |
| 132 | in man pages. However, the emulation is modified to include the | 131 | in man pages. However, the emulation is modified to include the |
| 133 | reformatting done by the Emacs @code{man} command. No hyphenation is | 132 | reformatting done by the Emacs @code{man} command. No hyphenation is |
| @@ -145,7 +144,7 @@ small- and medium-size pages). | |||
| 145 | 144 | ||
| 146 | This browser works quite well on simple well-written man files. It | 145 | This browser works quite well on simple well-written man files. It |
| 147 | works less well on idiosyncratic files that ``break the rules'' or use | 146 | works less well on idiosyncratic files that ``break the rules'' or use |
| 148 | the more obscure @code{ROFF} requests directly. Current test results | 147 | the more obscure @code{roff} requests directly. Current test results |
| 149 | are available in the file | 148 | are available in the file |
| 150 | @uref{http://centaur.maths.qmw.ac.uk/Emacs/WoMan/files/woman.status, | 149 | @uref{http://centaur.maths.qmw.ac.uk/Emacs/WoMan/files/woman.status, |
| 151 | @file{woman.status}}. | 150 | @file{woman.status}}. |
| @@ -169,7 +168,7 @@ Reporting Bugs}. | |||
| 169 | 168 | ||
| 170 | @c =================================================================== | 169 | @c =================================================================== |
| 171 | 170 | ||
| 172 | @node Background, Installation, Introduction, Top | 171 | @node Background, Finding, Introduction, Top |
| 173 | @comment node-name, next, previous, up | 172 | @comment node-name, next, previous, up |
| 174 | @chapter Background | 173 | @chapter Background |
| 175 | @cindex background | 174 | @cindex background |
| @@ -178,31 +177,31 @@ WoMan is a browser for traditional Unix-style manual page documentation. | |||
| 178 | Each such document is conventionally referred to as a @dfn{manual page}, | 177 | Each such document is conventionally referred to as a @dfn{manual page}, |
| 179 | or @dfn{man page} for short, even though some are very much longer than | 178 | or @dfn{man page} for short, even though some are very much longer than |
| 180 | one page. A man page is a document written using the Unix ``man'' | 179 | one page. A man page is a document written using the Unix ``man'' |
| 181 | macros, which are themselves written in the NROFF/TROFF text processing | 180 | macros, which are themselves written in the nroff/troff text processing |
| 182 | markup language. @code{NROFF} and @code{TROFF} are text processors | 181 | markup language. @code{nroff} and @code{troff} are text processors |
| 183 | originally written for the UNIX operating system by Joseph F. Ossanna at | 182 | originally written for the UNIX operating system by Joseph F. Ossanna at |
| 184 | Bell Laboratories, Murray Hill, New Jersey, USA@. They are closely | 183 | Bell Laboratories, Murray Hill, New Jersey, USA@. They are closely |
| 185 | related, and except in the few cases where the distinction between them | 184 | related, and except in the few cases where the distinction between them |
| 186 | is important I will refer to them both ambiguously as @dfn{ROFF}. | 185 | is important I will refer to them both ambiguously as @code{roff}. |
| 187 | 186 | ||
| 188 | @code{ROFF} markup consists of @dfn{requests} and @dfn{escape | 187 | @code{roff} markup consists of @dfn{requests} and @dfn{escape |
| 189 | sequences}. A request occupies a complete line and begins with either a | 188 | sequences}. A request occupies a complete line and begins with either a |
| 190 | period or a single forward quote. An escape sequences is embedded | 189 | period or a single forward quote. An escape sequences is embedded |
| 191 | within the input text and begins (by default) with a backslash. The | 190 | within the input text and begins (by default) with a backslash. The |
| 192 | original man macro package defines 20 new @code{ROFF} requests | 191 | original man macro package defines 20 new @code{roff} requests |
| 193 | implemented as macros, which were considered to be sufficient for | 192 | implemented as macros, which were considered to be sufficient for |
| 194 | writing man pages. But whilst in principle man pages use only the man | 193 | writing man pages. But whilst in principle man pages use only the man |
| 195 | macros, in practice a significant number use many other @code{ROFF} | 194 | macros, in practice a significant number use many other @code{roff} |
| 196 | requests. | 195 | requests. |
| 197 | 196 | ||
| 198 | The distinction between @code{TROFF} and @code{NROFF} is that | 197 | The distinction between @code{troff} and @code{nroff} is that |
| 199 | @code{TROFF} was designed to drive a phototypesetter whereas | 198 | @code{troff} was designed to drive a phototypesetter whereas |
| 200 | @code{NROFF} was designed to produce essentially @acronym{ASCII} output for a | 199 | @code{nroff} was designed to produce essentially @acronym{ASCII} output for a |
| 201 | character-based device similar to a teletypewriter (usually abbreviated | 200 | character-based device similar to a teletypewriter (usually abbreviated |
| 202 | to ``teletype'' or ``tty''). Hence, @code{TROFF} supports much finer | 201 | to ``teletype'' or ``tty''). Hence, @code{troff} supports much finer |
| 203 | control over output positioning than does @code{NROFF} and can be seen | 202 | control over output positioning than does @code{nroff} and can be seen |
| 204 | as a forerunner of @TeX{}. Traditionally, man pages are either | 203 | as a forerunner of @TeX{}. Traditionally, man pages are either |
| 205 | formatted by @code{TROFF} for typesetting or by @code{NROFF} for | 204 | formatted by @code{troff} for typesetting or by @code{nroff} for |
| 206 | printing on a character printer or displaying on a screen. Of course, | 205 | printing on a character printer or displaying on a screen. Of course, |
| 207 | over the last 25 years or so, the distinction between typeset output on | 206 | over the last 25 years or so, the distinction between typeset output on |
| 208 | paper and characters on a screen has become blurred by the fact that | 207 | paper and characters on a screen has become blurred by the fact that |
| @@ -214,8 +213,8 @@ Nevertheless, Unix-style manual page documentation is still normally | |||
| 214 | browsed on screen by running a program called @code{man}. This program | 213 | browsed on screen by running a program called @code{man}. This program |
| 215 | looks in a predefined set of directories for the man page matching a | 214 | looks in a predefined set of directories for the man page matching a |
| 216 | specified topic, then either formats the source file by running | 215 | specified topic, then either formats the source file by running |
| 217 | @code{NROFF} or recovers a pre-formatted file, and displays it via a | 216 | @code{nroff} or recovers a pre-formatted file, and displays it via a |
| 218 | pager such as @code{more}. @code{NROFF} normally formats for a printer, | 217 | pager such as @code{more}. @code{nroff} normally formats for a printer, |
| 219 | so it paginates the output, numbers the pages, etc., most of which is | 218 | so it paginates the output, numbers the pages, etc., most of which is |
| 220 | irrelevant when the document is browsed as a continuous scrollable | 219 | irrelevant when the document is browsed as a continuous scrollable |
| 221 | document on screen. The only concession to on-screen browsing normally | 220 | document on screen. The only concession to on-screen browsing normally |
| @@ -228,7 +227,7 @@ command, see @ref{Documentation, man, Documentation Commands, emacs, GNU | |||
| 228 | Emacs Manual}. | 227 | Emacs Manual}. |
| 229 | This command runs @code{man} as described above, perhaps in | 228 | This command runs @code{man} as described above, perhaps in |
| 230 | the background, and then post-processes the output to remove much of the | 229 | the background, and then post-processes the output to remove much of the |
| 231 | @code{NROFF} pagination such as page headers and footers, and places the | 230 | @code{nroff} pagination such as page headers and footers, and places the |
| 232 | result into an Emacs buffer. It puts this buffer into a special major | 231 | result into an Emacs buffer. It puts this buffer into a special major |
| 233 | mode, which is tailored for man page browsing, and provides a number of | 232 | mode, which is tailored for man page browsing, and provides a number of |
| 234 | useful navigation commands, support for following references, etc. It | 233 | useful navigation commands, support for following references, etc. It |
| @@ -236,7 +235,7 @@ provides some support for special display faces (fonts), but no special | |||
| 236 | menu or mouse support. The Emacs man package appears to have been | 235 | menu or mouse support. The Emacs man package appears to have been |
| 237 | developed over about 10 years, from the late 1980s to the late 1990s. | 236 | developed over about 10 years, from the late 1980s to the late 1990s. |
| 238 | 237 | ||
| 239 | There is considerable inefficiency in having @code{NROFF} paginate a | 238 | There is considerable inefficiency in having @code{nroff} paginate a |
| 240 | document and then removing most of the pagination! | 239 | document and then removing most of the pagination! |
| 241 | 240 | ||
| 242 | WoMan is an Emacs Lisp library that provides an emulation of the | 241 | WoMan is an Emacs Lisp library that provides an emulation of the |
| @@ -253,22 +252,22 @@ with Unix-style manual page documentation. This may be difficult to | |||
| 253 | read because ports of the Unix-style @code{man} program can be a little | 252 | read because ports of the Unix-style @code{man} program can be a little |
| 254 | awkward to set up. I decided that it should not be too hard to emulate | 253 | awkward to set up. I decided that it should not be too hard to emulate |
| 255 | the 20 @code{man} macros directly, without treating them as macros and | 254 | the 20 @code{man} macros directly, without treating them as macros and |
| 256 | largely ignoring the underlying @code{ROFF} requests, given the text | 255 | largely ignoring the underlying @code{roff} requests, given the text |
| 257 | processing capabilities of Emacs. This proved to be essentially true, | 256 | processing capabilities of Emacs. This proved to be essentially true, |
| 258 | and it did not take a great deal of work to be able to format simple man | 257 | and it did not take a great deal of work to be able to format simple man |
| 259 | pages acceptably. | 258 | pages acceptably. |
| 260 | 259 | ||
| 261 | One problem arose with the significant number of man pages that use | 260 | One problem arose with the significant number of man pages that use |
| 262 | @code{ROFF} requests in addition to the @code{man} macros, and since | 261 | @code{roff} requests in addition to the @code{man} macros, and since |
| 263 | releasing the first version of WoMan I have been continually extending | 262 | releasing the first version of WoMan I have been continually extending |
| 264 | it to support more @code{ROFF} requests. WoMan can now format a | 263 | it to support more @code{roff} requests. WoMan can now format a |
| 265 | significant proportion of the man pages that I have tested, either well | 264 | significant proportion of the man pages that I have tested, either well |
| 266 | or at least readably. However, I have added capabilities partly by | 265 | or at least readably. However, I have added capabilities partly by |
| 267 | making additional passes through the document, a design that is | 266 | making additional passes through the document, a design that is |
| 268 | fundamentally flawed. This can only be solved by a major re-design of | 267 | fundamentally flawed. This can only be solved by a major re-design of |
| 269 | WoMan to handle the major formatting within a single recursive pass, | 268 | WoMan to handle the major formatting within a single recursive pass, |
| 270 | rather than the present multiple passes without any significant | 269 | rather than the present multiple passes without any significant |
| 271 | recursion. There are some @code{ROFF} requests that cannot be handled | 270 | recursion. There are some @code{roff} requests that cannot be handled |
| 272 | satisfactorily within the present design. Some of these are currently | 271 | satisfactorily within the present design. Some of these are currently |
| 273 | handled by kludges that ``usually more or less work.'' | 272 | handled by kludges that ``usually more or less work.'' |
| 274 | 273 | ||
| @@ -288,227 +287,18 @@ WoMan has (this) texinfo documentation! | |||
| 288 | WoMan @emph{does not} replace @code{man}, although it does use a number | 287 | WoMan @emph{does not} replace @code{man}, although it does use a number |
| 289 | of the facilities implemented in the Emacs @code{man} library. WoMan | 288 | of the facilities implemented in the Emacs @code{man} library. WoMan |
| 290 | and man can happily co-exist, which is very useful for comparison and | 289 | and man can happily co-exist, which is very useful for comparison and |
| 291 | debugging purposes. The only way in which WoMan affects @code{man} is | 290 | debugging purposes. |
| 292 | that it adds a timer to indicate how long @code{man} has taken to format | 291 | |
| 293 | a man page. The timing is as compatible as possible with the timing | 292 | @code{nroff} simulates non-@acronym{ASCII} characters by using one or more |
| 294 | built into WoMan, for as fair a comparison as possible. The time | ||
| 295 | comparison seems to depend on the details of the platform, the version | ||
| 296 | of @code{man} in use, etc, but times are similar and WoMan is never | ||
| 297 | significantly slower than @code{man}. This is despite the fact that | ||
| 298 | WoMan is running byte code whereas most of the formatting done by | ||
| 299 | @code{man} uses machine code, and is a testimony to the quality of the | ||
| 300 | Emacs Lisp system. | ||
| 301 | |||
| 302 | @code{NROFF} simulates non-@acronym{ASCII} characters by using one or more | ||
| 303 | @acronym{ASCII} characters. WoMan should be able to do much better than | 293 | @acronym{ASCII} characters. WoMan should be able to do much better than |
| 304 | this. I have recently begun to add support for WoMan to use more of the | 294 | this. I have recently begun to add support for WoMan to use more of the |
| 305 | characters in its default font and to use a symbol font, and it is an | 295 | characters in its default font and to use a symbol font, and it is an |
| 306 | aspect that I intend to develop further in the near future. It should | 296 | aspect that I intend to develop further in the near future. It should |
| 307 | be possible to move WoMan from an emulation of @code{NROFF} to an | 297 | be possible to move WoMan from an emulation of @code{nroff} to an |
| 308 | emulation of @code{TROFF} as GNU Emacs moves to providing bit-mapped | 298 | emulation of @code{troff} as GNU Emacs moves to providing bit-mapped |
| 309 | display facilities. | 299 | display facilities. |
| 310 | 300 | ||
| 311 | @c =================================================================== | 301 | @node Finding, Browsing, Background, Top |
| 312 | |||
| 313 | @node Installation, Finding, Background, Top | ||
| 314 | @comment node-name, next, previous, up | ||
| 315 | @chapter Installation and Setup | ||
| 316 | @cindex installation | ||
| 317 | @cindex setup | ||
| 318 | |||
| 319 | No installation is necessary if you just want to run the version of | ||
| 320 | WoMan distributed with GNU Emacs 21 or later, although some additional | ||
| 321 | setup may still be desirable. | ||
| 322 | |||
| 323 | If you are installing @file{woman.el}, either to update the version | ||
| 324 | distributed with GNU Emacs or because WoMan was not distributed with | ||
| 325 | your version of Emacs, then you need to put the file in a directory in | ||
| 326 | your Emacs load path and byte compile it. A good directory to use is | ||
| 327 | the @file{site-lisp} directory in your Emacs file tree, e.g.@: | ||
| 328 | @file{/usr/local/share/emacs/@var{version}/site-lisp/} (where | ||
| 329 | @var{version} is your Emacs version), provided you have write access to | ||
| 330 | it. If you use a directory that is not included by default in your | ||
| 331 | Emacs load path then you need to add something like this to your | ||
| 332 | @file{.emacs} initialization file: | ||
| 333 | |||
| 334 | @lisp | ||
| 335 | (add-to-list 'load-path "my-lisp") | ||
| 336 | @end lisp | ||
| 337 | |||
| 338 | @noindent | ||
| 339 | where @file{my-lisp} is the pathname of the directory. @xref{Init File, , | ||
| 340 | The Init File ~/.emacs, emacs, The Emacs Editor}, for further details on | ||
| 341 | customizing Emacs in general. | ||
| 342 | |||
| 343 | You can byte-compile the file by using the Emacs command | ||
| 344 | @code{byte-compile-file} or by opening the directory containing the | ||
| 345 | file, putting point on it and pressing the key @kbd{B}. (In fact, if | ||
| 346 | the file is compiled then it is only the compiled file that needs to be | ||
| 347 | in the Emacs load path, but leaving the source file there will do no | ||
| 348 | harm.) | ||
| 349 | |||
| 350 | @heading Setup | ||
| 351 | |||
| 352 | Setup that is either necessary or desirable consists of adding a small | ||
| 353 | amount of Emacs Lisp code to your @file{.emacs} initialization file. It | ||
| 354 | may be necessary (or at least convenient) to make WoMan autoload (if you | ||
| 355 | are not running GNU Emacs 21 or later) and to set the search path used | ||
| 356 | by the @code{woman} interface. You may also find it convenient to make | ||
| 357 | various WoMan menu and key bindings available and to make WoMan | ||
| 358 | customizable even before WoMan has been loaded. | ||
| 359 | |||
| 360 | It is possible to run WoMan from a command line (from outside or even | ||
| 361 | from inside Emacs) by suitably configuring your command interpreter. | ||
| 362 | |||
| 363 | @menu | ||
| 364 | * Autoloading:: Autoloading | ||
| 365 | * Search Path:: Search Path | ||
| 366 | * Auto Bindings:: Preloading Menu and Key Bindings | ||
| 367 | * Auto Customization:: Preloading Customization | ||
| 368 | * Command Line:: Command Line Access | ||
| 369 | @end menu | ||
| 370 | |||
| 371 | |||
| 372 | @node Autoloading, Search Path, Installation, Installation | ||
| 373 | @comment node-name, next, previous, up | ||
| 374 | @section Autoloading | ||
| 375 | @cindex autoloading | ||
| 376 | |||
| 377 | If you are not running GNU Emacs 21 or later then you are recommended to | ||
| 378 | add these autoloads to your @file{.emacs} file: | ||
| 379 | |||
| 380 | @lisp | ||
| 381 | (autoload 'woman "woman" | ||
| 382 | "Decode and browse a Unix man page." t) | ||
| 383 | (autoload 'woman-find-file "woman" | ||
| 384 | "Find, decode and browse a specific Unix man-page file." t) | ||
| 385 | (autoload 'woman-dired-find-file "woman" | ||
| 386 | "In dired, run the WoMan man-page browser on this file." t) | ||
| 387 | @end lisp | ||
| 388 | |||
| 389 | @noindent | ||
| 390 | (In GNU Emacs 21 and later these autoloads are predefined.) | ||
| 391 | |||
| 392 | |||
| 393 | @node Search Path, Auto Bindings, Autoloading, Installation | ||
| 394 | @comment node-name, next, previous, up | ||
| 395 | @section Search Path | ||
| 396 | @cindex search path | ||
| 397 | |||
| 398 | The next step is necessary if you want to use the friendliest WoMan | ||
| 399 | interface, which is recommended in general. If the @code{MANPATH} | ||
| 400 | environment variable is set then WoMan will use it; alternatively (or | ||
| 401 | additionally), if your platform uses a man configuration file (as do | ||
| 402 | many versions of Linux) then WoMan will use it, provided it can find it. | ||
| 403 | (This may need configuration. @xref{Interface Options, , Interface | ||
| 404 | Options}.) If these mechanisms correctly define the search path for man | ||
| 405 | pages then no further action is required. | ||
| 406 | |||
| 407 | Otherwise you may need to customize the user option | ||
| 408 | @code{woman-manpath}, and you may also want to customize the user option | ||
| 409 | @code{woman-path}. @xref{Customization, , Customization}. Now you can | ||
| 410 | execute the extended command @code{woman} and enter or select a manual | ||
| 411 | topic using completion, and if necessary select a filename, again using | ||
| 412 | completion. By default, WoMan suggests the word nearest to point in the | ||
| 413 | current buffer as the topic. | ||
| 414 | |||
| 415 | |||
| 416 | @node Auto Bindings, Auto Customization, Search Path, Installation | ||
| 417 | @comment node-name, next, previous, up | ||
| 418 | @section Preloading Menu and Key Bindings | ||
| 419 | @cindex preloading menu and key bindings | ||
| 420 | @cindex menu bindings, preloading | ||
| 421 | @cindex key bindings, preloading | ||
| 422 | @cindex bindings, preloading | ||
| 423 | |||
| 424 | Once WoMan is loaded it adds an item to the @samp{Help} menu and defines | ||
| 425 | one or more keys in dired mode to run WoMan on the current file. If you | ||
| 426 | would like these facilities always to be available, even before WoMan is | ||
| 427 | loaded, then add the following to your @file{.emacs} file: | ||
| 428 | |||
| 429 | @lisp | ||
| 430 | (define-key-after menu-bar-manuals-menu [woman] | ||
| 431 | '(menu-item "Read Man Page (WoMan)..." woman | ||
| 432 | :help "Man-page documentation Without Man") t) | ||
| 433 | |||
| 434 | (add-hook 'dired-mode-hook | ||
| 435 | (lambda () | ||
| 436 | (define-key dired-mode-map "W" 'woman-dired-find-file))) | ||
| 437 | @end lisp | ||
| 438 | |||
| 439 | (By default, WoMan will automatically define the dired keys @kbd{W} and | ||
| 440 | @kbd{w} when it loads, but only if they are not already defined. This | ||
| 441 | behavior is controlled by the user option @code{woman-dired-keys}. | ||
| 442 | Note that the @code{dired-x} (dired extra) package binds | ||
| 443 | @code{dired-copy-filename-as-kill} to the key @kbd{w}, although @kbd{W} | ||
| 444 | appears to be unused. The @code{dired-x} package will over-write the | ||
| 445 | WoMan binding for @kbd{w}, whereas (by default) WoMan will not overwrite | ||
| 446 | the @code{dired-x} binding.) | ||
| 447 | |||
| 448 | |||
| 449 | @node Auto Customization, Command Line, Auto Bindings, Installation | ||
| 450 | @comment node-name, next, previous, up | ||
| 451 | @section Preloading Customization | ||
| 452 | @cindex preloading customization | ||
| 453 | @cindex customization, preloading | ||
| 454 | |||
| 455 | WoMan supports the GNU Emacs 20+ customization facility, and puts a | ||
| 456 | customization group called @code{WoMan} in the @code{Help} group under | ||
| 457 | the top-level @code{Emacs} group. In order to be able to customize | ||
| 458 | WoMan without first loading it, add the following to your @file{.emacs} | ||
| 459 | file: | ||
| 460 | |||
| 461 | @lisp | ||
| 462 | (defgroup woman nil | ||
| 463 | "Browse UNIX manual pages `wo (without) man'." | ||
| 464 | :tag "WoMan" :group 'help :load "woman") | ||
| 465 | @end lisp | ||
| 466 | |||
| 467 | |||
| 468 | @node Command Line, , Auto Customization, Installation | ||
| 469 | @comment node-name, next, previous, up | ||
| 470 | @section Command Line Access | ||
| 471 | @cindex command line access | ||
| 472 | |||
| 473 | If you really want to square the man-woman circle then you can! If you | ||
| 474 | run the GNU command interpreter @code{bash} then you might care to | ||
| 475 | define the following @code{bash} function in your @code{bash} | ||
| 476 | initialization file @file{.bashrc}: | ||
| 477 | |||
| 478 | @example | ||
| 479 | man() @{ gnudoit -q '(raise-frame (selected-frame)) (woman' \"$1\" ')' ; @} | ||
| 480 | @end example | ||
| 481 | |||
| 482 | If you use a Microsoft command interpreter (@file{command.com} or | ||
| 483 | @file{cmd.exe}) then you can create a file called @file{man.bat} | ||
| 484 | somewhere in your path containing the two lines: | ||
| 485 | |||
| 486 | @example | ||
| 487 | @@echo off | ||
| 488 | gnudoit -q (raise-frame (selected-frame)) (woman \"%1\") | ||
| 489 | @end example | ||
| 490 | |||
| 491 | and then (e.g.@: from a command prompt or the @samp{Run...} option in the | ||
| 492 | Windows @samp{Start} menu) just execute | ||
| 493 | |||
| 494 | @example | ||
| 495 | man man_page_name | ||
| 496 | @end example | ||
| 497 | |||
| 498 | (Of course, if you already have a @code{man} command installed then you | ||
| 499 | could call these commands @code{woman} instead of @code{man}.) | ||
| 500 | |||
| 501 | The above examples assume that you have the @code{gnuserv} Emacs | ||
| 502 | client-server package installed (which I recommend). It would be | ||
| 503 | possible to do something similar by calling Emacs directly, but that is | ||
| 504 | less satisfactory, because you are likely to end up with multiple copies | ||
| 505 | of Emacs running, which is generally inelegant, inefficient and | ||
| 506 | inconvenient. If you run a different command interpreter then something | ||
| 507 | similar to the above suggestions should be possible. | ||
| 508 | |||
| 509 | @c =================================================================== | ||
| 510 | |||
| 511 | @node Finding, Browsing, Installation, Top | ||
| 512 | @comment node-name, next, previous, up | 302 | @comment node-name, next, previous, up |
| 513 | @chapter Finding and Formatting Man Pages | 303 | @chapter Finding and Formatting Man Pages |
| 514 | @cindex using, finding man pages | 304 | @cindex using, finding man pages |
| @@ -572,19 +362,18 @@ setting WoMan file paths. | |||
| 572 | 362 | ||
| 573 | The topic interface is accessed principally via the command | 363 | The topic interface is accessed principally via the command |
| 574 | @code{woman}. The same command can be accessed via the menu item | 364 | @code{woman}. The same command can be accessed via the menu item |
| 575 | @samp{Help->Manuals->Read Man Page (WoMan)...} either once WoMan has been | 365 | @samp{Help->Manuals->Read Man Page (WoMan)...} once WoMan has been |
| 576 | loaded or if it is set up specially. @xref{Installation, , Installation | 366 | loaded. The command reads a manual topic in the minibuffer, which can |
| 577 | and Setup}. The command reads a manual topic in the minibuffer, which | 367 | be the @dfn{basename} of a man file anywhere in the man file |
| 578 | can be the @dfn{basename} of a man file anywhere in the man file | 368 | structure. The ``basename'' in this context means the filename |
| 579 | structure. The ``basename'' in this context means the filename without | 369 | without any directory component and without any extension or suffix |
| 580 | any directory component and without any extension or suffix components | 370 | components that relate to the file type. So, for example, if there is |
| 581 | that relate to the file type. So, for example, if there is a compressed | 371 | a compressed source file in Chapter 5 of the UNIX Programmer's Manual |
| 582 | source file in Chapter 5 of the UNIX Programmer's Manual with the full | 372 | with the full pathname @file{/usr/local/man/man5/man.conf.5.gz} then |
| 583 | pathname @file{/usr/local/man/man5/man.conf.5.gz} then the topic is | 373 | the topic is @code{man.conf}. Provided WoMan is configured correctly, |
| 584 | @code{man.conf}. Provided WoMan is configured correctly, this topic | 374 | this topic will appear among the completions offered by @code{woman}. |
| 585 | will appear among the completions offered by @code{woman}. If more than | 375 | If more than one file has the same topic name then WoMan will prompt |
| 586 | one file has the same topic name then WoMan will prompt for which file | 376 | for which file to format. Completion of topics is case insensitive. |
| 587 | to format. Completion of topics is case insensitive. | ||
| 588 | 377 | ||
| 589 | Clearly, @code{woman} has to know where to look for man files and there | 378 | Clearly, @code{woman} has to know where to look for man files and there |
| 590 | are two customizable user options that store this information: | 379 | are two customizable user options that store this information: |
| @@ -834,7 +623,7 @@ blank lines squeezed to a single blank line. | |||
| 834 | @cindex fonts | 623 | @cindex fonts |
| 835 | @cindex faces | 624 | @cindex faces |
| 836 | 625 | ||
| 837 | Fonts used by @code{ROFF} are handled by WoMan as faces, the details of | 626 | Fonts used by @code{roff} are handled by WoMan as faces, the details of |
| 838 | which are customizable. @xref{Faces, , Faces}. WoMan supports both the | 627 | which are customizable. @xref{Faces, , Faces}. WoMan supports both the |
| 839 | italic and bold fonts normally used in man pages, together with a single | 628 | italic and bold fonts normally used in man pages, together with a single |
| 840 | face to represent all unknown fonts (which are occasionally used in | 629 | face to represent all unknown fonts (which are occasionally used in |
| @@ -1070,15 +859,12 @@ is distributed with GNU Emacs. | |||
| 1070 | @chapter Customization | 859 | @chapter Customization |
| 1071 | @cindex customization | 860 | @cindex customization |
| 1072 | 861 | ||
| 1073 | All WoMan user options are customizable, and it is recommended to change | 862 | All WoMan user options are customizable, and it is recommended to |
| 1074 | them only via the standard Emacs customization facilities. WoMan | 863 | change them only via the standard Emacs customization facilities. |
| 1075 | defines a top-level customization group called @code{WoMan} under the | 864 | WoMan defines a top-level customization group called @code{WoMan} |
| 1076 | parent group @code{Help}. The WoMan customization group is available | 865 | under the parent group @code{Help}. It can be accessed either via the |
| 1077 | only once WoMan has been loaded unless it is specially set up to be | 866 | standard Emacs facilities, e.g.@: via the @samp{Help->Customize} |
| 1078 | automatically available. @xref{Auto Customization, , Preloading | 867 | submenu, or via the WoMan major mode menu. |
| 1079 | Customization}. It can be accessed either via the standard Emacs | ||
| 1080 | facilities, e.g.@: via the @samp{Help->Customize} submenu, or via the | ||
| 1081 | WoMan major mode menu. | ||
| 1082 | 868 | ||
| 1083 | The top-level WoMan group contains only a few general options and three | 869 | The top-level WoMan group contains only a few general options and three |
| 1084 | subgroups. The hooks are provided only for special purposes that, for | 870 | subgroups. The hooks are provided only for special purposes that, for |
| @@ -1385,7 +1171,7 @@ headings. Default is @code{t}. [Heading emboldening is @emph{not} standard | |||
| 1385 | 1171 | ||
| 1386 | @item woman-ignore | 1172 | @item woman-ignore |
| 1387 | A boolean value. If non-@code{nil} then unrecognised requests etc. are | 1173 | A boolean value. If non-@code{nil} then unrecognised requests etc. are |
| 1388 | ignored. Default is @code{t}. This gives the standard @code{ROFF} behavior. | 1174 | ignored. Default is @code{t}. This gives the standard @code{roff} behavior. |
| 1389 | If @code{nil} then they are left in the buffer, which may aid debugging. | 1175 | If @code{nil} then they are left in the buffer, which may aid debugging. |
| 1390 | 1176 | ||
| 1391 | @item woman-preserve-ascii | 1177 | @item woman-preserve-ascii |
| @@ -1395,8 +1181,8 @@ WoMan buffer. Otherwise, non-@acronym{ASCII} characters (that display as | |||
| 1395 | saved to a file. Default is @code{nil}. | 1181 | saved to a file. Default is @code{nil}. |
| 1396 | 1182 | ||
| 1397 | @item woman-emulation | 1183 | @item woman-emulation |
| 1398 | WoMan emulation, currently either @code{NROFF} or @code{TROFF}. Default | 1184 | WoMan emulation, currently either @code{nroff} or @code{troff}. Default |
| 1399 | is @code{NROFF}. @code{TROFF} emulation is experimental and largely | 1185 | is @code{nroff}. @code{troff} emulation is experimental and largely |
| 1400 | untested. | 1186 | untested. |
| 1401 | @end vtable | 1187 | @end vtable |
| 1402 | 1188 | ||
| @@ -1417,8 +1203,8 @@ either colors or different fonts. | |||
| 1417 | 1203 | ||
| 1418 | @item woman-italic-face | 1204 | @item woman-italic-face |
| 1419 | Face for italic font in man pages. Default: italic, underlined, | 1205 | Face for italic font in man pages. Default: italic, underlined, |
| 1420 | foreground red. This is overkill! @code{TROFF} uses just italic; | 1206 | foreground red. This is overkill! @code{troff} uses just italic; |
| 1421 | @code{NROFF} uses just underline. You should probably select either | 1207 | @code{nroff} uses just underline. You should probably select either |
| 1422 | italic or underline as you prefer, but not both, although italic and | 1208 | italic or underline as you prefer, but not both, although italic and |
| 1423 | underline work together perfectly well! | 1209 | underline work together perfectly well! |
| 1424 | 1210 | ||
| @@ -1494,7 +1280,7 @@ At present, all warnings should be treated with some suspicion. | |||
| 1494 | Uninterpreted escape sequences are also logged (in some cases). | 1280 | Uninterpreted escape sequences are also logged (in some cases). |
| 1495 | 1281 | ||
| 1496 | By resetting the variable @code{woman-ignore} to @code{nil} (by default | 1282 | By resetting the variable @code{woman-ignore} to @code{nil} (by default |
| 1497 | it is @code{t}), uninterpreted @code{ROFF} requests can optionally be | 1283 | it is @code{t}), uninterpreted @code{roff} requests can optionally be |
| 1498 | left in the formatted buffer to indicate precisely where they occurred. | 1284 | left in the formatted buffer to indicate precisely where they occurred. |
| 1499 | @xref{Interface Options, , Interface Options}. | 1285 | @xref{Interface Options, , Interface Options}. |
| 1500 | 1286 | ||
| @@ -1514,7 +1300,7 @@ left in the formatted buffer to indicate precisely where they occurred. | |||
| 1514 | WoMan currently assumes 10 characters per inch horizontally, hence a | 1300 | WoMan currently assumes 10 characters per inch horizontally, hence a |
| 1515 | horizontal resolution of 24 basic units, and 5 lines per inch | 1301 | horizontal resolution of 24 basic units, and 5 lines per inch |
| 1516 | vertically, hence a vertical resolution of 48 basic units. | 1302 | vertically, hence a vertical resolution of 48 basic units. |
| 1517 | (@code{NROFF} uses 240 per inch.) | 1303 | (@code{nroff} uses 240 per inch.) |
| 1518 | 1304 | ||
| 1519 | @heading Vertical spacing and blank lines | 1305 | @heading Vertical spacing and blank lines |
| 1520 | 1306 | ||