Emacs找不到flyspell/ispell

Tak*_*keS 16 emacs spell-checking flyspell

在我的Mac(Snow Leopard,10.6.8)上,我使用的是此处提供的Emacs 24.2的修改版本,以便从下载页面中使用Emacs Speaks Statistics(ESS).Emacs有效,但我还没有能够使用拼写检查器.

为了解决这个问题,我按照本页的说明下载了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)
Run Code Online (Sandbox Code Playgroud)

当我打开.tex文件并使用时M-x flyspell-mode,我可以"自动完成"它(即通过按Tab键给我正确的flyspell选项)但是当我按下时RET我得到:

Searching for program: no such file or directory, ispell
Run Code Online (Sandbox Code Playgroud)

这个问题这个问题中提出的解决方案都没有起作用,所以我不确定这里的问题是什么.有没有人有想法或之前遇到过这个问题?

lun*_*orn 32

在尝试随机网站的任意指令之前,请阅读 Emacs自己提供的文档.

Emacs 24.2包括Flyspell.您不能明确安装它.如果这样做,请撤消此操作,即flyspell.el从中删除/Applications/Emacs.app/Contents/Resources/site-lisp.充其量,/Applications/Emacs.app完全删除,并重新安装,从头开始.

但是,Flyspell需要一个拼写检查工具,它不包含在Emacs中.错误消息告诉您没有安装此类工具.

您需要安装ASpell拼写检查程序.你可以用它安装自制brew install aspell.

  • 实际上,安装aspell并不适合我.在做了'brew install ispell --with-lang-en`之后,`flyspell-mode`认出了它. (8认同)
  • 单独安装aspell和ispell并没有解决我的问题.我还必须添加`(setenv"PATH"(concat(getenv"PATH")":/ usr/local/bin"))`和`(setq exec-path(追加exec-path'("/ usr/local)/bin")))`到我的.emacs文件,如[建议]这里(http://sdqali.in/blog/2012/05/04/fixing-flyspell-for-emacs-in-mac-os-x /). (4认同)
  • OP的问题不足为奇,因为从flyspell [网站](http://www.emacswiki.org/emacs/FlySpell)显而易见,需要安装aspell。 (2认同)

Lin*_*and 6

我用自制软件安装了ispell和apsell,可以得到我在〜/ .emacs中设置的那个

[iMac ~]$ cat .emacs
(setq ispell-program-name "/usr/local/bin/aspell")
Run Code Online (Sandbox Code Playgroud)

有这种类似的讨论在这里