Emacs Windows 拼写检查 - aspell 或 hunspell
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/2012361/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Emacs Windows spellcheck - aspell or hunspell
提问by kjfletch
I use emacs 23.1.50 version on Windows XP operation system. I could not setup hunspell or aspell as part of emacs with the example provided by the emacs wiki. Anyone has working confiugration for windows xp and please help me out.
我在 Windows XP 操作系统上使用 emacs 23.1.50 版本。我无法使用 emacs wiki 提供的示例将 hunspell 或 aspell 设置为 emacs 的一部分。任何人都有 windows xp 的工作配置,请帮助我。
回答by kjfletch
I use aspell for spellchecking with emacs on Windows. Looking at my .emacs
file I can see these configuration variables.
我在 Windows 上使用 aspell 与 emacs 进行拼写检查。查看我的.emacs
文件,我可以看到这些配置变量。
(custom-set-variables
'(ispell-dictionary "british")
'(ispell-program-name "H:\bin\aspell\bin\aspell.exe"))
I installed aspell with the installation wizard. M-S-$
ispell-buffer
flyspell-mode
and the like all work correctly for me.
我用安装向导安装了 aspell。M-S-$
ispell-buffer
flyspell-mode
等等对我来说都正常工作。
回答by vedang
aspell can be easily installed on windows using cygwin. In the cygwin setup, search for aspell in the search bar and select it for installation. Remember to also select the dictionary you want to install (for the english language - aspell-en). Add the cygwin/bin directory to the load-path in emacs, so that emacs can find the executable when it needs it. Finally, add the following line to your .emacs file:
aspell 可以使用cygwin轻松安装在 windows 上。在 cygwin 设置中,在搜索栏中搜索 aspell 并选择它进行安装。记住还要选择要安装的词典(对于英语 - aspell-en)。在emacs中的load-path中添加cygwin/bin目录,以便emacs需要的时候可以找到可执行文件。最后,将以下行添加到您的 .emacs 文件中:
(setq-default ispell-program-name "aspell")
HTH
HTH
回答by chen bin
See http://blog.binchen.org/posts/what-s-the-best-spell-check-set-up-in-emacs.html
见http://blog.binchen.org/posts/what-s-the-best-spell-check-set-up-in-emacs.html
It explains why aspell is better for programmers.
它解释了为什么 aspell 更适合程序员。