Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/wpf/14.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Emacs找不到flyspell/ispell_Emacs_Spell Checking_Flyspell - Fatal编程技术网

Emacs找不到flyspell/ispell

Emacs找不到flyspell/ispell,emacs,spell-checking,flyspell,Emacs,Spell Checking,Flyspell,在我的Mac(Snow Leopard,10.6.8)上,我正在使用Emacs 24.2的一个修改版本来利用来自。Emacs可以工作,但我还没能让拼写检查器工作 为了纠正这个问题,我按照的说明下载flyspell。我将flyspell.el文件复制到我的/Applications/Emacs.app/Contents/Resources/site lisp目录中,这显然是我的Emacs加载路径的目录(请注意,例如,auctex.el文件位于该目录中) 然后,我通过添加以下内容修改了我的.emac

在我的Mac(Snow Leopard,10.6.8)上,我正在使用Emacs 24.2的一个修改版本来利用来自。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)
当我打开
.tex
文件,并使用
M-x flyspell模式
时,我可以“自动完成”它(即通过按tab键,它为我提供正确的flyspell选项),但当我按
RET
时,我得到:

Searching for program: no such file or directory, ispell
没有一个解决方案是有效的,所以我不确定这里的问题是什么。有没有人有过想法或者以前遇到过这个问题?

请先阅读Emacs自己提供的文档,然后再尝试随机网站上的任意指令

Emacs 24.2包括Flyspell。您必须而不是明确安装它。如果执行此操作,请撤消此操作,即从
/Applications/Emacs.app/Contents/Resources/site lisp
中删除
flyspell.el
。最好完全删除
/Applications/Emacs.app
,然后重新安装,从头开始

但是,Flyspell需要一个拼写检查工具,这不包括在Emacs中。错误消息告诉您尚未安装此类工具

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

安装它。我曾经安装过ispell和apsell,现在可以使用~/.emacs中设置的任何一个

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

在windows上也有类似的讨论,我必须执行以下操作才能启动Ispell进程:

  • 下载的ispell()
  • 解压缩我路径中文件夹中的内容(即Windows或 c:\windows\system
  • 下载aspell(获取 完整下载。请参阅页面上的链接。(是否需要 (我不知道是不是卖了)
  • 将下面显示的代码添加到init.el文件中

  • 运行aspell安装程序

  • 再次启动emacs,错误不会出现

    (require 'package)
    (add-to-list 'package-archives
             '("MELPA Stable" . "http://stable.melpa.org/packages/") t)
    (package-initialize)
    (package-refresh-contents)
    
    (package-install 'flycheck)
    
    (global-flycheck-mode)
    
    (use-package flycheck
      :ensure t
      :init
      (global-flycheck-mode t))
    
    (setq ispell-program-name "C:\\Program Files (x86)\\Aspell\\bin\\aspell.exe"
    

  • 你们很多人不必做以上所有的事情,但这正是我在运行Windows 7的Emacs上所做的。

    或Macports作为自制软件的替代品。如果O.p.想让他/她的生活变得非常简单,就用Aquamacs代替——它使用OSX内置的NSSpellChecker。然后O.p.就不需要任何东西了。实际上,安装aspell对m不起作用e、 在执行
    brew安装ispell——使用lang en
    之后,
    flyspell mode
    意识到了这一点。OP的问题并不奇怪,因为从flyspell上看不明显需要安装aspell。单独安装aspell和ispell并不能解决我的问题。我还必须添加
    (setenv“PATH”(concat(getenv“PATH))“:/usr/local/bin”)
    (setq exec path(追加exec path'(“/usr/local/bin”))
    按建议添加到我的.emacs文件中。虽然我根本不需要安装ispell,但这仍然有效。只需安装aspell并将ispell程序名设置为指向它。aspell是较新的ispell,似乎工作正常。看起来aspell不再适用于使用emacs 26.1的Windows,而是使用Hunspill: