From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 In-Reply-To: References: From: =?ISO-8859-1?Q?Rub=E9n_Berenguel?= Date: Sun, 15 Dec 2013 13:01:22 +0100 Message-ID: To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: multipart/alternative; boundary=047d7b675e3e6366ea04ed9175d5 Subject: Re: [9fans] Spell checking with acme in p9p Topicbox-Message-UUID: 9a4792d2-ead8-11e9-9d60-3106f5b1d025 --047d7b675e3e6366ea04ed9175d5 Content-Type: text/plain; charset=ISO-8859-1 Sometimes (for long pieces of text like blog posts) I use wwb to check style and readability. Correcting something usually is 1. Right-click the line number in +errors 2. Correct 3. Go back to 1 For spell checking, tweaking aspell's output is best. Also, keep in mind that all the steps can be (after tweaking) 1. Double click the correct word in +Errors 2. 2-3 chord to copy it (so you don't even leave the line or mouse) 2. 3 click the line number (I think there is a way to use :lineno with an additional regex, that would be handy here to directly land on the word) 3. Double click the wrong word 4. Without leaving 1 pressed, 3 to paste (pressing command if on trackpad) It's pretty fast, actually. Beware of adding column pos to aspell output, since after editing the buffer these will change. By the way, do you know about 1-2 chords, don't you? For some of these tasks it may be useful. Ruben PS: Sent it a while ago, always forgetting I don't have this email account configured on my iPad :/ On Sun, Dec 15, 2013 at 3:46 AM, Blake McBride wrote: > 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 acmeif 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 > > --047d7b675e3e6366ea04ed9175d5 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Sometimes (for long pieces of text like blog posts) I use wwb to check st= yle and readability. Correcting something usually is

1. Right-click the line number i= n +errors
<= span style=3D"font-family:arial,sans-serif;font-size:13px">2. Correct
3. Go back to 1=

For spell checking, tweaking aspell's= output is best. Also, keep in mind that all the steps can be (after tweaki= ng)

1. Double click the correct word= in +Errors
2. 2-3 chord to= copy it (so you don't even leave the line or mouse)
2. 3 click the = line number (I think there is a way to use :lineno with an additional regex= , that would be handy here to directly land on the word)
3. Double click= the wrong word
4. Without= leaving 1 pressed, 3 to paste (pressing command if on trackpad)

It's pretty fast, actually. = Beware of adding column pos to aspell output, since after editing the buffe= r these will change.

By the way, do you know about 1-= 2 chords, don't you? For some of these tasks it may be useful.

Rub= en

PS: Sent it a while ago, always forgetting I don't have this email a= ccount configured on my iPad :/


On Sun, Dec 15, 2013 at 3:46 AM, Blake M= cBride <blake@mcbride.name> wrote:
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. =A0snar= f 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


--047d7b675e3e6366ea04ed9175d5--