Emacs 找不到 Flyspell/ispell

标签 emacs spell-checking flyspell

在我的 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 中不包含该工具。错误消息告诉您没有安装此类工具。

您需要安装ASpell拼写检查器。您可以使用 homebrew 安装它使用brew install aspell

关于Emacs 找不到 Flyspell/ispell,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17126951/

相关文章:

python - Emacs:加载后评估代码始终被执行

Emacs mouse-5 绑定(bind)问题(向下滚动)

Vim 拼写检查器无法识别连接的单词(德语)

vba - 忽略拼写检查中的文本框

java - Java 中的拼写检查和/或拼写更正

emacs - 如何从 ispell 私有(private)词典中删除条目?

linux - 如何在 Ubuntu 终端中退出 emacs 文本编辑器?

emacs - 是否可以在每个文件的基础上禁用次要模式(例如 flyspell)?

user-interface - Flyspell 正确单词的用户交互改进

emacs - 组织模式中的 FlySpell 识别 latex 语法,如 auctex