9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Blake McBride <blake@mcbride.name>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: [9fans] Spell checking with acme in p9p
Date: Sat, 14 Dec 2013 20:46:40 -0600	[thread overview]
Message-ID: <CABwHSOtmyUEYeU1aKt=nCBCZS9kgtQQ2Q=h_WvnVLd2sDcJ8cw@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1533 bytes --]

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

[-- Attachment #2: Type: text/html, Size: 2884 bytes --]

             reply	other threads:[~2013-12-15  2:46 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-15  2:46 Blake McBride [this message]
2013-12-15  3:45 ` Bakul Shah
2013-12-15 12:01 ` Rubén Berenguel
2013-12-15 15:08   ` Blake McBride
2013-12-15 16:03     ` erik quanstrom
2013-12-15 16:27     ` Mark van Atten
2013-12-15 11:55 trebol

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CABwHSOtmyUEYeU1aKt=nCBCZS9kgtQQ2Q=h_WvnVLd2sDcJ8cw@mail.gmail.com' \
    --to=blake@mcbride.name \
    --cc=9fans@9fans.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).