在mac os x上的emacs,如何获得拼写检查工作 [英] emacs on mac os x, how to get spell check to work
问题描述
我已经安装了 GNU emacs ,只需复制我的Windows .emacs
文件,似乎工作正常,除了拼写检查。我安装了 cocoAspell ,并按照此安装说明添加路径并将ispell更改为aspell,但是当我执行拼写检查时,我得到
错误:文件/use/local/lib/aspell-0.60/english无法打开阅读。
,FlySpell也不起作用。
看起来它正在查看错误的目录,但我已经有
(setq ispell-program-nameaspell
ispell-dictionaryenglish
ispell-dictionary-alist
(let((默认'([A-Za-z ][^ A-Za-z][']nil
(-B-denglish--dict-dir
/ Library / Application支持/ cocoAspell / aspell6-en-6.0-0)
nil iso-8859-1)))
`((nil,@ default)
(english,@ default) ))
哪些指向正确的字典目录/ Library / Application Support / cocoAspell / aspell6- EN-6.0-0\" 。我不知道为什么我收到错误以及如何解决它。
更新: strong>
现在我已经删除了我的GNU emacs和cocoAspell,并重新安装(并链接)emacs / aspell使用homebrew作为@katspaugh建议。我删除了上面显示的代码,只留下
(setq ispell-program-nameaspell)
现在,当我执行拼写检查,我得到了
搜索程序:没有这样的文件或目录,aspell
我已经链接aspell with brew link aspell
,为什么还找不到?
这是一个工作解决方案:
- 安装 Homebrew
-
brew install emacs --with-cocoa --with-gnutls
-
brew install aspell --with-all-langs
-
open -a Emacs
- Mx ispell
享受! p>
I'm moving from Windows to Mac, and I've spent the whole night trying to get emacs to work.
I've installed GNU emacs and simply copied over my Windows .emacs
file, which seems to work ok, except for spell check. I installed cocoAspell and followed this setup instruction to add the path and change ispell to aspell, but when I run spell check, I got
Error: The file "/use/local/lib/aspell-0.60/english" can not be opened for reading.
and FlySpell does not work either.
It seems like it's looking at the wrong directory, but I already have
(setq ispell-program-name "aspell"
ispell-dictionary "english"
ispell-dictionary-alist
(let ((default '("[A-Za-z]" "[^A-Za-z]" "[']" nil
("-B" "-d" "english" "--dict-dir"
"/Library/Application Support/cocoAspell/aspell6-en-6.0-0")
nil iso-8859-1)))
`((nil ,@default)
("english" ,@default))))
which points to the right dictionary directory "/Library/Application Support/cocoAspell/aspell6-en-6.0-0". I can't figure out why I got the error and how to fix it.
Update:
Now I have removed my GNU emacs and cocoAspell, and re-installed (and linked) emacs/aspell using homebrew as @katspaugh suggested. I removed the code shown above, leave only
(setq ispell-program-name "aspell")
Now when I run spell check, I got
Searching for program: No such file or directory, aspell
I have already linked aspell with brew link aspell
, why it still cannot find it?
Here's a working solution:
- Install Homebrew
brew install emacs --with-cocoa --with-gnutls
brew install aspell --with-all-langs
open -a Emacs
- M-x ispell
Enjoy!
这篇关于在mac os x上的emacs,如何获得拼写检查工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!