我最近在我的新系统中安装了fedora 21,然后是emacs 24文本编辑器。当我尝试进行拼写检查时,我在底部收到以下消息:
ispell-phaf:没有匹配的nil条目。
我知道它与ispell拼写检查工具链接的词典有关,但无法确切地知道问题是什么。请帮助我的朋友....
答案 0 :(得分:3)
与提到的@lawlist一样,错误来自函数ispell-parse-hunspell-affix-file
。它试图做的是从ispell-dictionary
或ispell-local-dictionary
拉入您的设置字典,然后将该值传递给上述函数。该函数然后拉出ispell-local-dictionary-alist
中定义的alist,然后传递给hunspell。
所以你需要特别做的是向ispell-local-dictionary-alist
添加一个条目,如下所示(例如取自here:
(setq ispell-local-dictionary-alist '(
("american"
"[[:alpha:]]"
"[^[:alpha:]]"
"[']"
t
("-d" "en_US" "-p" "D:\\hunspell\\share\\hunspell\\personal.en")
nil
iso-8859-1))
如果您需要确保“美国”所在的位置,您的词典名称与您输入ispell-dictionary
或ispell-local-dictionary
的值完全匹配,并确保通过你希望通过这一行进入hunspell的参数:(“ - - ”“en_US”“ - p”“D:\ hunspell \ share \ hunspell \ personal.en”)。您可以看到hunspell将执行here命令。希望至少应该为您提供更有意义的错误消息,以便您知道还有什么问题。
答案 1 :(得分:2)
这最终对我有用(详情见以下博客)......
http://blog.binchen.org/posts/what-s-the-best-spell-check-set-up-in-emacs.html
我在上面的博客中选择了“非程序员的建议”......
谢谢大家的支持...... @lawlist @Allan Zhang @Lucas @Rob Spanton
答案 2 :(得分:0)
迁移到新操作系统时,我遇到了类似的问题。迁移还将我的emacs从24.3升级到24.4(现在我在24.5)。
我通过安装以下内容解决了这个问题:
rw-language-and-country-codes
rw-ispell
rw-hunspell
然后重新启动emacs。我被困了很长时间因为我忘了重新启动emacs - 所以不要忘记!维基可能也会有所帮助:http://www.emacswiki.org/emacs/InteractiveSpell
答案 3 :(得分:0)
安装Fedora 22之后我遇到了类似的问题。我通过安装Fedora存储库中的hunspell-en-GB
软件包解决了这个问题。
答案 4 :(得分:0)
即使错误与Hunspell函数有关,但当Emacs无法找到aspell
时,会弹出此错误。默认情况下不使用Hunspell,即使它出现在系统上(据我所知)。确保安装它和一些字典:
sudo yum install aspell aspell-en
或其他语言的其他词典。
您可能对Fedora包搜索感兴趣: