all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Fabrice Niessen" <fgdmjuzqrjgh-geNee64TY+gS+FvcfC7Uqw@public.gmane.org>
To: help-gnu-emacs-mXXj517/zsQ@public.gmane.org
Subject: Re: Auto-correcting proper nouns with flyspell?
Date: Wed, 16 Sep 2009 13:53:58 +0200	[thread overview]
Message-ID: <87ocpb5cmh.fsf@mundaneum.com> (raw)
In-Reply-To: mailman.6789.1253094817.2239.help-gnu-emacs@gnu.org

Hi,

Andreas Politz wrote:
> d@teklibre.org (Dave Täht) writes:
>
>> Is there a way to make Emacs (flyspell) automatically capitalize proper
>> nouns that have no other equivalent, instead of marking them in yellow with
>> an underscore?
>
> Since there is `flyspell-incorrect-hook', you can do all kinds of things.
>
> (defun flyspell-correct-case (beg end info)
>   (when (and (consp info)
>              (equal (downcase (car info))
>                     (downcase (caaddr info))))
>     (save-excursion
>       (delete-region beg end)
>       (insert (caaddr info)))))
>
> (add-hook 'flyspell-incorrect-hook 'flyspell-correct-case))

While the idea is good, I personally find this dangerous, as "Emacs" then
changes things for you, without you knowing which ones in particular (how to
find where it has been auto-corrected?). I know I can expect such a behavior
from MS Word, with its wizzard and its auto-correction rules, but I personally
hate that behavior from Emacs.

For example, "Next meeting on 5th of October" becomes "Next meeting on 5Th of
October" with such hook. Not nice for that particular case.

On the other hand, one thing that I want from Emacs + ispell, and that MS
doesn't offer (IMHO): the possibility to leave buffers unscanned for errors
when just opening files for reading. As soon as we change something in them,
then, yes, ispell is launched over the whole buffer. I have this behavior
already working for years, but I still have troubles with ispell and some
modes (like Org). Have to spend some time identifiying the root cause.

If you're interested, take a look at
http://www.mygooglest.com/fni/dot-emacs.html.

Best regards,
  Fabrice

-- 
Fabrice Niessen
Search the Web with "My Google Search Tools" on http://www.MyGooglest.com


  parent reply	other threads:[~2009-09-16 11:53 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-15  2:34 Auto-correcting proper nouns with flyspell? Dave Täht
2009-09-16  9:53 ` Andreas Politz
     [not found] ` <mailman.6789.1253094817.2239.help-gnu-emacs@gnu.org>
2009-09-16 11:53   ` Fabrice Niessen [this message]
2009-09-17  0:28     ` Andreas Politz
2009-09-17  1:32     ` Dave Täht
2009-09-17  9:16       ` Fabrice Niessen
     [not found]     ` <mailman.6834.1253147339.2239.help-gnu-emacs@gnu.org>
2009-09-17  8:14       ` Fabrice Niessen

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=87ocpb5cmh.fsf@mundaneum.com \
    --to=fgdmjuzqrjgh-genee64ty+gs+fvcfc7uqw@public.gmane.org \
    --cc=help-gnu-emacs-mXXj517/zsQ@public.gmane.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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.