From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Ian Dunn Newsgroups: gmane.emacs.devel Subject: Re: [ELPA] New package: Auto Correct Mode Date: Sun, 27 Aug 2017 20:29:56 -0400 Message-ID: <87tw0scz5n.fsf@escafil> References: <87zialc7wx.fsf@escafil> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1503880252 12059 195.159.176.226 (28 Aug 2017 00:30:52 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 28 Aug 2017 00:30:52 +0000 (UTC) User-Agent: mu4e 0.9.19; emacs 26.0.50 Cc: emacs-devel@gnu.org To: John Wiegley Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Aug 28 02:30:44 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dm7wo-0002GK-Rr for ged-emacs-devel@m.gmane.org; Mon, 28 Aug 2017 02:30:34 +0200 Original-Received: from localhost ([::1]:36204 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dm7wt-0007fd-47 for ged-emacs-devel@m.gmane.org; Sun, 27 Aug 2017 20:30:39 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56026) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dm7wn-0007fV-5B for emacs-devel@gnu.org; Sun, 27 Aug 2017 20:30:34 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dm7wm-0002j3-50 for emacs-devel@gnu.org; Sun, 27 Aug 2017 20:30:33 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:33575) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dm7wm-0002iu-28; Sun, 27 Aug 2017 20:30:32 -0400 Original-Received: from [2604:6000:1010:176:da4d:3352:bae5:f50e] (port=35232 helo=escafil) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dm7wl-0005uM-M3; Sun, 27 Aug 2017 20:30:31 -0400 In-reply-to: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:217858 Archived-At: 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