From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 Date: Sat, 14 Dec 2013 20:46:40 -0600 Message-ID: From: Blake McBride To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: multipart/alternative; boundary=001a1135fb3470352404ed89b4f6 Subject: [9fans] Spell checking with acme in p9p Topicbox-Message-UUID: 99cf2c52-ead8-11e9-9d60-3106f5b1d025 --001a1135fb3470352404ed89b4f6 Content-Type: text/plain; charset=ISO-8859-1 Greetings, I am trying to get spell checking working with acme on a Mac using p9p. I am using the following script: # aspell pipe |grep '^&' When run on a text selection (with >), it returns me with a list of incorrectly spelled words along with a list of potential corrections. Each line represents the misspelled word and its suggested corrections. Cool, I've got what I need. I can modify what it returns through awk to give me the line and character of the word, and reformat the line to be more meaningful to acme if it would be helpful. The problem is that there are a lot of steps to make a correction. I think I need to: 1. snarf the misspelled word from the Errors buffer 2. Paste the word into the tag line of the file being checked 3. Right-click on the word in the tag line to find it in the input file 4. Select the correct spelling from one of the aspell suggestions in the Errors window and snarf it. 5. Select the incorrectly spelled word in the input file and paste the corrected word in its place. As I said earlier, I may be able to simplify a step or so by reformatting the result of the spell check with awk, but I'm not sure what would be helpful yet. So, I guess the point of this is that there are a lot of steps necessary to correct a text's spelling. It would be easier just to do: aspell check file.txt But that would be side-stepping acme. I am just wondering how others handle this situation. Thank you! Blake McBride --001a1135fb3470352404ed89b4f6 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Greetings,

I am trying to get spell che= cking working with acme on a Mac=A0using p9p. =A0I am using the following s= cript:

=A0 =A0 #
=A0 =A0=A0aspell<= /span> pipe |grep '^&'

When run on a text selection (with >), it returns me= with a list of incorrectly spelled words along with a list of potential co= rrections. =A0Each line represents the misspelled word and its suggested co= rrections. =A0Cool, I've got what I need.

I can modify what it returns through awk= =A0to give me the line and character of the word, and reformat the line to = be more meaningful to acme if it would be helpful.

The problem is that there are a lot of steps to make a = correction. =A0I think I need to:

1. =A0sn= arf the misspelled word from the Errors buffer

2. =A0Paste the word into the tag line of the file bein= g checked

3. =A0Right-click on the word in the tag= line to find it in the input file

4. =A0Select th= e correct spelling from one of the aspell=A0suggestions in the= Errors window and snarf it.

5. =A0Select the incorrectly spelled word in the input = file and paste the corrected word in its place.

As= I said earlier, I may be able to simplify a step or so by reformatting the= result of the spell check with awk, but I'm not sure what= would be helpful yet.

So, I guess the point of this is that there are a lot o= f steps necessary to correct a text's spelling. =A0It would be easier j= ust to do:

=A0 =A0 aspell=A0check fil= e.txt

But that would be side-stepping acme. =A0I= am just wondering how others handle this situation.

Thank you!

Blake McBride

--001a1135fb3470352404ed89b4f6--