From: Ian Dunn <dunni@gnu.org>
To: John Wiegley <jwiegley@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: [ELPA] New package: Auto Correct Mode
Date: Sun, 27 Aug 2017 20:29:56 -0400 [thread overview]
Message-ID: <87tw0scz5n.fsf@escafil> (raw)
In-Reply-To: <m2378cbyz6.fsf@newartisans.com>
JW> How does this compare to flyspell-auto-correct-word, or a setting such
JW> as:
JW> (add-hook 'flyspell-incorrect-hook
JW> 'flyspell-maybe-correct-transposition)
JW> Maybe what you're offering is already possible, or can be integrated
JW> directly with flyspell using a customization?
I don't believe so.
It's similar to repeatedly using flyspell-auto-correct-word and setting flyspell-abbrev-p to t, but with two differences (that I can see):
1. auto-correct-mode uses its own abbrev table, enabled using `abbrev-minor-mode-table-alist'. This means it doesn't clutter the user's global abbrev table, and auto-correct can be disabled by disabling the minor mode. Flyspell only allows the use of the global or local abbrev tables.
2. auto-correct gives a predicate that can provide further control over when to expand auto-corrections. My favorite example is my abbrev that turns "i" to "I". I keep auto-correct enabled in all modes, but prog-mode has this predicate set to only auto-correct when inside a comment or string. If "i" turned to I every time I typed it in C++ (which, so far as I can tell, would happen with flyspell's corrections), I'd go mad. However, it has proved nothing but useful for this correction to happen when I'm writing prose or documentation.
So as I said, the same functionality doesn't appear to be possible with flyspell at the moment.
--
Ian Dunn
next prev parent reply other threads:[~2017-08-28 0:29 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-27 16:06 [ELPA] New package: Auto Correct Mode Ian Dunn
2017-08-27 16:34 ` Eli Zaretskii
2017-08-27 18:23 ` Ian Dunn
2017-08-27 18:43 ` Eli Zaretskii
2017-08-27 19:19 ` John Wiegley
2017-08-28 0:29 ` Ian Dunn [this message]
2017-09-02 20:58 ` Ian Dunn
2017-09-03 20:48 ` John Wiegley
2017-09-04 13:47 ` Ian Dunn
2017-09-04 22:17 ` Stefan Monnier
2017-09-05 1:04 ` Ian Dunn
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87tw0scz5n.fsf@escafil \
--to=dunni@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=jwiegley@gmail.com \
/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.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).