emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Matt Price <moptop99@gmail.com>
To: John Kitchin <jkitchin@andrew.cmu.edu>
Cc: Org Mode <emacs-orgmode@gnu.org>,
	"Samuel W. Flint" <swflint@flintfam.org>
Subject: Re: [OT] wildcards in autocorrect?
Date: Sat, 28 Mar 2015 15:56:34 -0400	[thread overview]
Message-ID: <CAN_Dec-X6=QsQur2TzX7t_HGP--yHEUSRkpYn2NLe22Do0Pz6w@mail.gmail.com> (raw)
In-Reply-To: <CAJ51ETpx_r93CiP_XRgbQevk0Luq6dot1JXbUT3ZVa9f_jRdrA@mail.gmail.com>

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

On Sat, Mar 28, 2015 at 2:20 PM, John Kitchin <jkitchin@andrew.cmu.edu>
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

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

      parent reply	other threads:[~2015-03-28 19:56 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-28 14:19 [OT] wildcards in autocorrect? Matt Price
2015-03-28 16:57 ` Samuel W. Flint
2015-03-28 17:17   ` Ken Mankoff
2015-03-28 17:47     ` briangpowell .
2015-03-28 17:58       ` briangpowell .
2015-03-28 18:20   ` John Kitchin
2015-03-28 18:34     ` briangpowell .
2015-03-28 19:56     ` Matt Price [this message]

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.orgmode.org/

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

  git send-email \
    --in-reply-to='CAN_Dec-X6=QsQur2TzX7t_HGP--yHEUSRkpYn2NLe22Do0Pz6w@mail.gmail.com' \
    --to=moptop99@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=jkitchin@andrew.cmu.edu \
    --cc=swflint@flintfam.org \
    /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/org-mode.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).