### ## Start of some commentary about using `ispell' from within `pine' # by LeRoy N. Eide 04-Mar-97 # related to pine-3.95 and its spell-checking capabilities ... ## # Specifies the program invoked by ^T in the Composer. speller=/usr/uucc/exec/ispell -x -B -L3 -P -V -W0 -d/usr/uucc/lib/english # # Pine arbitrarily suffixes the name of a temporary file to the above command # but permits no more than 8 command arguments (counting the automagically # appended temporary filename, so you really can't define more than 7 args!). # [Note that there is a bug here in pine-3.95. If you specify exactly 8 args, # `pine' won't notice at first but will then get confused when it attempts # to append the temporary filename as the 9th argument! You are warned!!] # # Note: Pine does NOT pass its speller command through a shell -- # it more-or-less `exec's it directly after some minimal processing # [useful documentation about filters is extremely lacking -- even at # http://www.washington.edu/pine/ # so some experimentation has been done but much more is needed here!]: # 0) Shell meta-characters (except as noted below) are left intact as # (part of the) text argument(s). # 1) An initial ~ in the command name is replaced by the value of the $HOME # environment variable; in arguments use $HOME (or ${HOME}) instead. # 2) Environment variable references of the form $VAR (or ${VAR}) are # interpolated in ALL contexts except where preceded by a \ character # (in which case the \ character is removed and the following $ remains # as text); the ${VAR} form is required if there is any trailing text # (which would otherwise be taken as part of the variable name -- even # if it's punctuation!). Examples: # If the environment variable $VAR is set to `foo', then: # '$VAR' == '${VAR'} => ' [if ${VAR'} is undefined -- usually the case!]; # '${VAR}' => 'foo' ; "${VAR}" => "foo" ; ${VAR} => foo ; $VAR => foo ; # \$VAR => $VAR # 3) A \ character may be used in only 2 contexts: # \\ => \ ; \$ => $ # All other occurences of a \ character are simply left intact as text. # # Note that some installations of `ispell' may be severely brain-damaged; # you may need to use some (or all) of the following options to get `ispell' # to work the way that you want it to ... # # -a|A|f|l|s -- DON'T use any of these options; they are useful(?) only when # using `ispell' as a filter -- and `pine' doesn't filter any # of its spell-checking! # -v -- DON'T use this option; `ispell -v' just prints its version and # then exits! [Note that `ispell -vv' prints some configuration # information, but it also is otherwise not very useful here!] # -b|x -- Since the input file for `ispell' is a temporary file, specifying # -b (keep original file with '.bak' extension) is not very useful; # -x should be forced here (don't keep '.bak' file). Note that # `ispell' always creates the '.bak' file initially (so that the # entire spelling session can be successfully aborted); -x simply # causes the '.bak' file to be ultimately deleted (you don't really # want a copy of your message lying around, even with misspellings!). # -B|C -- Report run-together words with missing blanks as errors (-B) or # consider run-together words as legal compounds (-C); the latter # is useful for agglutinative languages, less so for English. # The default is to suggest either an intervening space or a hyphen # (you may add your favorite compounds to your personal dictionary). # -L# -- Context is often useful when making spelling decisions; force this # to be something useful (like -L3) -- the default may be weird. # -m|P -- Making up new words (-m) may be useful in some contexts; staying # with conventional root/affix combinations (-P) is more standard # (you may add your favorite neologisms to your personal dictionary). # -n|t -- Selects `nroff' (-n) or `troff' (-t) mode; the default is best. # -M|N -- The mini-menu (-M) is useful; use it unless you are a nerd (-N). # -S -- Sorting the list of guesses by probable correctness may be be # useful for the phonemicly impaired; the default is alphabetical. # -V -- Use this to display otherwise non-printable characters (e.g., # Control- and Meta-characters); probably a good idea unless you # (and your terminal) have some understanding of the character-set(s) # that you are using! # -W# -- Specifies the maximum length of words that are always legal; # the default is 1. Saying '-W0' checks ALL words! # # -w string -- Specifies one-or-more characters (string) that can legally # be part of a word; use this with caution! # Saying '-w&' (or '-w\046') will allow "AT&T" as a word. # # -T type -- Default formatter type (e.g., '.ext'); best leave this alone! # # -d file -- Specifies the (alternate) dictionary file; the extension # '.hash' is assumed if omitted. [You will need to specify # this if your `ispell' program doesn't have a default!] # If the specified file contains no '/'-character (i.e., no # path information), it will be considered to be an "alternate" # default dictionary (e.g., another "language"); consequently, # any file in the current (or home) directory must be specified # as "./file" (or "$HOME/file"). # # -p file -- Specifies your personal dictionary file. # If the specified file does not begin with '/', then "$HOME/" # is prefixed; if '-p file' is not specified, then the # environment variable "$WORDLIST" is used (if it exists); # otherwise, a personal dictionary file is searched for in the # current directory or (if none is found) in "$HOME" (creating # a file in "$HOME" if no personal dictionary is found). # The default personal dictionary filename is '.ispell_' # suffixed with the basename of the default (or specified) # dictionary hash file (e.g., '.ispell_english') without '.hash'. # For (backwards) compatibility, the personal dictionary file # '.ispell_words' is preferentially used if such exists. # If '-p file' is NOT specified, personal dictionaries in both # the current and home directories will be read (and internally # merged); any new words will preferentially be added to the # personal dictionary in the current directory (if such exists), # otherwise to the personal dictionary in the home directory. # # Note that `ispell' does NOT permit option bundling (each option must appear # by itself with its own leading '-' character) -- this presents problems when # combined with `pine's imposed 7-argument limit (choose options carefully!). # But `ispell' DOES permit argument snuggling for options that require an # additional argument (i.e., '-o arg' can generally be written as '-oarg') -- # take advantage of argument snuggling to keep withing the 7-argument limit! ## # End of some commentary about using `ispell' from within `pine' # by LeRoy N. Eide 04-Mar-97 ## related to pine-3.95 and its spell-checking capabilities ... ###