1:M-x flyspell-word 后总是提示“Error: No word lists can be found for the language "zh_CN"”.
其实这个问题的原因就是没有安装汉语包,当时我就上网找很多人有一个问题时“Enabling Flyspell-mode gives an error”,我也看了一些人的解答说“Missing dictionaries, or ones not found by emacs, seems to be the most common problem with aspell/ispell. ”从侧面也就能够说明基本上也就时dictionary经常是问题的根本,然后我就在dictionaries for international ispell试图找到相应的中文包,但是发现里面根本就没有中文的。并且我也想了,中文不像英语,你都已经能够打印出中文了还要什么书写检查呀,要有也是对一个词组什么的进行检查。因为想这个的时候我也通过下面的方式检验了在终端里面,即使文档里面有中文,ispell/flyspell / aspell 都是可以运行的。因为人家就不理你中文不就行了吗,为啥还报错。
$ cat /home/ryu/errors | aspell -a -l en
$ ispell file
既然没有中文包,现在的办法就应该像能够在终端中顺利运行的配置情况,不让他检查中文,只需在.emacs文件中加入
;; use apsell as ispell backend
(setq-default ispell-program-name "aspell")
;; use American English as ispell default dictionary
(ispell-change-dictionary "american" t)
2: ispell问题解决流程
1:首先你得确保ispell / flyspell / aspell 中你所用到的工具都已经安装好了。
$ sudo apt-get install aspell ;以aspell为例。
2:现在终端中运行是否能够检查出文件,如果行的话,一般在Emacs中就不会有问题,上面的问题1除外。
$ cat /home/ryu/errors | aspell -a -l en
$ ispell file3: 如果缺少了语言包,如何安装
$ sudo apt-get install aspell-en
$ sudo
apt-get
install
ispell iamerican dictionaries-common
你可以到ispell.el frequently ask question 查看一些原因,譬如
How do I install a new dictionary?
First you must install ispell. :-) Then follow these easy steps:
1:You will need a dictionary and associated affix definition. We have compiled a list of publicly available dictionaries you can choose from. (Please give us any dictionaries you have that are not on this list!)
2:Build the hash table by running the program buildhash on the dictionary. The following example uses the english.med dictionary:
buildhash english.med english.aff english.hash
3:Install the dictionary. Copy the .hash file to the install location.
The correct directory can be found with the command ispell -vv | grep LIBDIR
If this showed the directory "/usr/local/lib" then you would type:
cp english.hash /usr/local/lib
cp english.aff /usr/local/lib