Wednesday, April 10, 2013

Emacs, Flyspell/Ispell, Aspell, and Windows

I use Windows a lot. I know it's not the techiest OS out there, but hey, I grew up with DOS, Win 3.1, Windows 95/98/NT/2000/XP/7... and now 8. (I skipped Vista).

I also use Emacs a lot. I used to program mostly on Linux, and my school courses were all done with Emacs, so I got used to it. Now Emacs feels more like my index finger than a programming environment, but I digress.

I generally use Emacs for Latex as well, but until recently, I never bothered spell-checking my Latex on Windows (I just did it on whatever flavor of Unix I had installed on, or let my co-writers handle those changes).

But now, I really really need to finish my thesis, so spell-checking is important now at all times. So I can't find a decent howto for this, so here goes. (For my own sanity as well)

  1. Install Aspell. You'll need to download the binary installer (GNU Aspell-0.50.3 (win32)) as well as the dictionary (I use English), (Aspell-en-0.50-2-3.exe).
  2. Add

    (add-to-list 'exec-path "C:/Program Files (x86)/Aspell/bin/")
    (setq ispell-program-name "aspell")
    (setq ispell-dictionary "american")

    to your .emacs/.emacs.el/whatever initialization you use.
  3. Restart or M-x load-file .your_file_name_obviously_not_this_exact_name.
  4. M-x flyspell-mode or M-x ispell or whatever should work now.

As always, with unsolicited free Internet advice, YMMV.