3
votes

I have recently installed fedora 21 in my new system followed by emacs 24 text editor. When I try to do spell check, I am getting the following message at the bottom:

ispell-phaf: No matching entry for nil.

I understand that it has something to do with dictionaries linked with the ispell spell checking tool but unable to figure out exactly what the problem is. Please help me out friends....

5
The error is coming from ispell-parse-hunspell-affix-file -- M-x describe-function RET ispell-parse-hunspell-affix-file RET -- perhaps that will help you figure out what may be wrong, e.g., external utility of hunspell may not be property installed / configured? - lawlist

5 Answers

3
votes

Like @lawlist mentioned, the error is coming from the function ispell-parse-hunspell-affix-file. What ispell is trying to do is it's pulling in your set dictionary from ispell-dictionary or ispell-local-dictionary and then passing that value into the above function. That function then pulls the alist that is defined in ispell-local-dictionary-alist, which it then passes to hunspell.

So what you need to do in particular is to add an entry to ispell-local-dictionary-alist, something like this (example taken from here:

(setq ispell-local-dictionary-alist '(
("american"
       "[[:alpha:]]"
       "[^[:alpha:]]"
       "[']"
       t
       ("-d" "en_US" "-p" "D:\\hunspell\\share\\hunspell\\personal.en")
       nil
       iso-8859-1))

Where you need to make sure that where it says "american", you have the dictionary name that matches exactly with the value that you inputted into ispell-dictionary or ispell-local-dictionary, and make sure that you pass the arguments that you want into hunspell through this line: ("-d" "en_US" "-p" "D:\hunspell\share\hunspell\personal.en"). You can see what commands hunspell will take here. Hopefully that should at least get you a more meaningful error message so you know what else is going wrong.

2
votes

This worked for me finally (details in the following blog)...

http://blog.binchen.org/posts/what-s-the-best-spell-check-set-up-in-emacs.html

I chose the 'suggestion for non-programmers' in the above blog...

Thank you all for your support... @lawlist @Allan Zhang @Lucas @Rob Spanton

0
votes

I had a similar issue when migrating to a new OS as well. The migration also upgraded my emacs from 24.3 to 24.4 (and now I'm on 24.5).

I resolved this by installing the following:

rw-language-and-country-codes
rw-ispell
rw-hunspell

And then restarting emacs. I was stuck for a long time because I forgot to restart emacs - so don't forget! The wiki might also be helpful: http://www.emacswiki.org/emacs/InteractiveSpell

0
votes

I had a similar issue after install Fedora 22. I resolved this by installing the hunspell-en-GB package from the Fedora repositories.

0
votes

Even though the error has to do with a Hunspell function, this pops up when aspell can't be found by Emacs. Hunspell isn't used by default even when it's present on the system (as far as I can tell). Make sure it and some dictionaries are installed:

sudo yum install aspell aspell-en

or other dictionaries for other languages.

You might be interested in the Fedora package search:

https://apps.fedoraproject.org/packages/aspell