Article View: comp.windows.x.openlook
Article #1Re: ispell for mailtool/textedit
From: Mark Delaney
Date: Tue, 21 Jul 1992 17:49
Date: Tue, 21 Jul 1992 17:49
50 lines
2408 bytes
2408 bytes
In <1992Jul8.182057.14395@mlb.semi.harris.com> mwills@su102c (Scott Wills) writes:
>I've been using the following shell script, invoked from my
>~/.text_extras menu to interactively spell correct outgoing mailtool
>messages. It seems to work pretty well. Have other nifty solutions
>been devised?
I sort of made a little more generic solution... I just made a generic
filter support an let the argument be the interactive program to be
run. For example, my ~/.text_extras_menu has the following line:
"Ispell" filter ispell
And the filter program looks like this:
#!/bin/sh
TEMP=/tmp/X_filter_file
export TEMP
cat > $TEMP
shelltool $* $TEMP
cat $TEMP
You may be wondering why I made TEMP a constant and did not remove
it (a good point). Well, I had a problem that I am surprised that
you haven't run into... the selected region will timeout after a few
seconds. When this happens, the filtered region (in this case spell
corrected) is not replaced. So I also added the following to my
.text_extras_menu:
"Swap" cat /tmp/X_filter_file
This does require that I reselect the region which is kind of a drag.
If you have avoided this problem, can you let me know what you did
differently than I.
BTW, having my filter program be generic seems to be a good idea, but
I have yet to find another good use for it besides ispell (and ispell
is pretty spiffy... thanks to whomever wrote it).
>Delete leading spaces from all of the above, and replace
>"/full/path/to/ispell-stdin" with where ever you put the script.
Oh, I didn't use the full path because my "filter" program is in
my path... perhaps the full path is a better idea.
- Mark
--
Mark A. Delaney mdelaney@informix.com
[pyramid|uucp]!infmx!mdelaney
#include <disclaimer> (415) 926-6369
Technical Details
Message-ID:
<mdelaney.711740958@helios>Path:
arc1-ca.pugleaf.net!sparky!uunet!charon.amdahl.com!amdahl!veritas!amdcad!weitek!pyramid!infmx!helios!mdelaneyReferences:
<1992Jul8.182057.14395@mlb.semi.harris.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!charon.amdahl.com!amdahl!veritas!amdcad!weitek!pyramid!infmx!helios!mdelaney From: mdelaney@informix.com (Mark Delaney) Newsgroups: comp.windows.x.openlook,comp.unix.wizards Subject: Re: ispell for mailtool/textedit Keywords: ispell standard input Message-ID: <mdelaney.711740958@helios> Date: 21 Jul 92 17:49:18 GMT References: <1992Jul8.182057.14395@mlb.semi.harris.com> Sender: news@informix.com (Usenet News) Organization: Informix Software, Inc. Lines: 50