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.
我用自制软件安装了ispell和apsell,可以得到我在〜/ .emacs中设置的那个
[iMac ~]$ cat .emacs
(setq ispell-program-name "/usr/local/bin/aspell")
Run Code Online (Sandbox Code Playgroud)
有这种类似的讨论在这里