我正从Windows转移到Mac,并花了整个晚上尝试让emacs工作。
我已经安装了GNU Emacs,并简单地复制了我的Windows .emacs
文件,看起来一切都正常,除了拼写检查。我安装了CocoAspell,并按照这个设置说明添加了路径并将ispell更改为aspell,但是当我运行拼写检查时,出现了以下情况:
Error: The file "/use/local/lib/aspell-0.60/english" can not be opened for reading.
而且FlySpell也无法工作。
看起来它正在查找错误的目录,但我已经有了
(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))))
它指向正确的字典目录"/Library/Application Support/cocoAspell/aspell6-en-6.0-0"。我不知道为什么会出现错误以及如何修复它。
更新:
现在我已经移除了GNU Emacs和CocoAspell,并像@katspaugh建议的那样使用Homebrew重新安装(并链接)emacs/aspell。我删除了上面显示的代码,只留下
(setq ispell-program-name "aspell")
现在当我运行拼写检查时,我得到了:
Searching for program: No such file or directory, aspell
我已经通过 brew link aspell
将 aspell 进行了链接,为什么它仍然找不到它?