在我的 Mac(Snow Leopard,10.6.8)上,我使用的是 Emacs 24.2 的修改版本 provided here利用 downloads page 中的 Emacs Speaks Statistics (ESS) 。 Emacs 可以工作,但我还无法让拼写检查器工作。
为了纠正此问题,我按照 this page 中的说明进行操作下载flyspell。我将 flyspell.el
文件复制到我的 /Applications/Emacs.app/Contents/Resources/site-lisp
目录中,这显然是我的 emacs 加载路径的目录(请注意,例如,auctex.el
文件位于该目录中)。
然后,我修改了我的 .emacs
文件,添加了:
(autoload 'flyspell-mode "flyspell" "On-the-fly spelling checker." t)
(autoload 'flyspell-delay-command "flyspell" "Delay on command." t)
(autoload 'tex-mode-flyspell-verify "flyspell" "" t)
(add-hook 'LaTeX-mode-hook 'turn-on-flyspell)
当我打开 .tex
文件并使用 M-x Flyspell-mode
时,我可以“自动完成”它(即通过按 Tab 键它会给我正确的Flyspell 选项),但是当我按 RET
时,我得到:
Searching for program: no such file or directory, ispell
this question 中没有提出任何解决方案或this question有效,所以我不确定这里的问题是什么。有人有想法或者以前遇到过这个问题吗?
最佳答案
在尝试来自随机网站的任意指令之前,请阅读 Emacs 本身提供的文档。
Emacs 24.2 包含 Flyspell。您不得不显式安装它。如果这样做,请撤消此操作,即从 /Applications/Emacs.app/Contents/Resources/site-lisp
中删除 flyspell.el
。最好的情况是,完全删除 /Applications/Emacs.app
,然后重新安装它,从头开始。
但是,Flyspell 需要一个拼写检查工具,而 Emacs 中不包含该工具。错误消息告诉您没有安装此类工具。
关于Emacs 找不到 Flyspell/ispell,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17126951/