Emacs Micro Lesson 11: Personal ispell dictionary

Some people have a philosophical aversion to spell-checkers. And I can understand that. (Though, I find grammar checkers more fussy, prescriptive, and generally annoying.) As a general rule, I’d say avoid grammar checkers in creative writing, but they are OK for business writing. So there’s a happy medium between both philosophies.

Today, however, I’m just talking about a spell-checker in Emacs: ispell. This spell-checker comes pre-installed if you’re running Emacs on Linux. Mac users may require some additional configuration.

Apparently, I use a lot of uncommon words in my writing. (You see, I’m a writer.) So the default ispell dictionary will often flag me for a word I spelled correctly! So it’s far from perfect.

That’s why Emacs gives you a nice variable: ispell-personal-dictionary. This variable accepts a file as a value. That file contains a list of words you have added to your personal dictionary.

And you don’t need to edit the file manually. You can add words to your dictionary right from Emacs.

Set Up Your Dictionary File

Customize variable: ispell-personal-dictionary.

Or, for those who like to write configurations manually in Emacs Lisp, you can put this in your config file:

(setq ispell-personal-dictionary "~/path/to/your/personal-dictionary-file")

Adding Words To Your Personal Ispell Dictionary

If you spell a word correctly but ispell is flagging you, it’s easy to add the word to your personal dictionary. I’d recommend double-checking to make sure you have indeed spelled the word correctly, then you can

  1. C-c $ over the word at point
  2. Scroll through the corrections
  3. Go to the bottom, click Save word

That’s it! Open up your dictionary file, and you can confirm, your word is there.

1 Comment

  1. I think the command C-c $ is only for when you’re in flyspell-mode. If you are just running M-x ispell on your buffer, you would simply press ‘i’ to insert the flagged word into your private dictionary.

Leave a Reply

Your email address will not be published.


*