home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / unix / wizards / 3293 < prev    next >
Encoding:
Text File  |  1992-07-23  |  2.3 KB  |  63 lines

  1. Path: sparky!uunet!charon.amdahl.com!amdahl!veritas!amdcad!weitek!pyramid!infmx!helios!mdelaney
  2. From: mdelaney@informix.com (Mark Delaney)
  3. Newsgroups: comp.windows.x.openlook,comp.unix.wizards
  4. Subject: Re: ispell for mailtool/textedit
  5. Keywords: ispell standard input
  6. Message-ID: <mdelaney.711740958@helios>
  7. Date: 21 Jul 92 17:49:18 GMT
  8. References: <1992Jul8.182057.14395@mlb.semi.harris.com>
  9. Sender: news@informix.com (Usenet News)
  10. Organization: Informix Software, Inc.
  11. Lines: 50
  12.  
  13. In <1992Jul8.182057.14395@mlb.semi.harris.com> mwills@su102c (Scott Wills) writes:
  14.  
  15. >I've been using the following shell script, invoked from my
  16. >~/.text_extras menu to interactively spell correct outgoing mailtool
  17. >messages.  It seems to work pretty well.  Have other nifty solutions
  18. >been devised?
  19.  
  20. I sort of made a little more generic solution... I just made a generic
  21. filter support an let the argument be the interactive program to be
  22. run.  For example, my ~/.text_extras_menu has the following line:
  23.  
  24.    "Ispell"           filter ispell
  25.  
  26. And the filter program looks like this:
  27.  
  28.    #!/bin/sh
  29.    TEMP=/tmp/X_filter_file
  30.    export TEMP
  31.    cat > $TEMP
  32.    shelltool $* $TEMP
  33.    cat $TEMP
  34.  
  35. You may be wondering why I made TEMP a constant and did not remove
  36. it (a good point).  Well, I had a problem that I am surprised that 
  37. you haven't run into... the selected region will timeout after a few
  38. seconds.  When this happens, the filtered region (in this case spell
  39. corrected) is not replaced.  So I also added the following to my
  40. .text_extras_menu:
  41.  
  42.    "Swap"        cat /tmp/X_filter_file
  43.  
  44. This does require that I reselect the region which is kind of a drag.
  45. If you have avoided this problem, can you let me know what you did
  46. differently than I.
  47.  
  48. BTW, having my filter program be generic seems to be a good idea, but
  49. I have yet to find another good use for it besides ispell (and ispell
  50. is pretty spiffy... thanks to whomever wrote it).
  51.     
  52. >Delete leading spaces from all of the above, and replace
  53. >"/full/path/to/ispell-stdin" with where ever you put the script.
  54.  
  55. Oh, I didn't use the full path because my "filter" program is in
  56. my path... perhaps the full path is a better idea.
  57.  
  58.                         - Mark
  59. -- 
  60. Mark A. Delaney                  mdelaney@informix.com
  61.                                  [pyramid|uucp]!infmx!mdelaney
  62. #include <disclaimer>            (415) 926-6369
  63.