From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matt Price Subject: Re: [OT] wildcards in autocorrect? Date: Sat, 28 Mar 2015 15:56:34 -0400 Message-ID: References: <97A269DA-728F-4FC4-8B18-36254ACCA6C7@flintfam.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a113464a462f8eb05125ea5b1 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:51746) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YbwqS-0001uR-N1 for emacs-orgmode@gnu.org; Sat, 28 Mar 2015 15:56:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YbwqR-0002xu-KT for emacs-orgmode@gnu.org; Sat, 28 Mar 2015 15:56:36 -0400 Received: from mail-la0-x231.google.com ([2a00:1450:4010:c03::231]:36833) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YbwqR-0002xp-Cu for emacs-orgmode@gnu.org; Sat, 28 Mar 2015 15:56:35 -0400 Received: by labe2 with SMTP id e2so92440758lab.3 for ; Sat, 28 Mar 2015 12:56:34 -0700 (PDT) In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: John Kitchin Cc: Org Mode , "Samuel W. Flint" --001a113464a462f8eb05125ea5b1 Content-Type: text/plain; charset=UTF-8 On Sat, Mar 28, 2015 at 2:20 PM, John Kitchin wrote: > This is the code Samuel refers to. It is awesome. I use it less and less > ;) by which I mean everytime I use it is one less time I ever have to use > it. > > ;; > http://endlessparentheses.com/ispell-and-abbrev-the-perfect-auto-correct.html > (define-key ctl-x-map "\C-i" 'endless/ispell-word-then-abbrev) > > (defun endless/ispell-word-then-abbrev (p) > "Call `ispell-word'. Then create an abbrev for the correction made. > With prefix P, create local abbrev. Otherwise it will be global." > (interactive "P") > (let ((bef (downcase (or (thing-at-point 'word) ""))) aft) > (call-interactively 'ispell-word) > (setq aft (downcase (or (thing-at-point 'word) ""))) > (unless (string= aft bef) > (message "\"%s\" now expands to \"%s\" %sally" > bef aft (if p "loc" "glob")) > (define-abbrev > (if p global-abbrev-table local-abbrev-table) > bef aft)))) > > > ----- Cool, I'm going to give that a try -- not quite what I was asking for, but way better than what I've been doing so far!! Thanks John & Samuel --001a113464a462f8eb05125ea5b1 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

<= /div> --001a113464a462f8eb05125ea5b1--