mac os x 上的 emacs,如何进行拼写检查 [英] emacs on mac os x, how to get spell check to work

查看:39
本文介绍了mac os x 上的 emacs,如何进行拼写检查的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在从 Windows 迁移到 Mac,我花了一整夜的时间试图让 emacs 工作.

I'm moving from Windows to Mac, and I've spent the whole night trying to get emacs to work.

我已经安装了 GNU emacs 并简单地复制了我的 Windows .emacs 文件,这似乎工作正常,拼写检查除外.我安装了 cocoAspell 并遵循了这个 安装说明 添加路径并将 ispell 更改为 aspell,但是当我运行拼写检查时,我得到了

I've installed GNU emacs and simply copied over my Windows .emacs file, which seems to work ok, except for spell check. I installed cocoAspell and followed this setup instruction to add the path and change ispell to aspell, but when I run spell check, I got

Error: The file "/use/local/lib/aspell-0.60/english" can not be opened for reading.

并且 FlySpell 也不起作用.

and FlySpell does not work either.

它好像看错了目录,但我已经有了

It seems like it's looking at the wrong directory, but I already have

(setq ispell-program-name "aspell"
      ispell-dictionary "english"
      ispell-dictionary-alist
      (let ((default '("[A-Za-z]" "[^A-Za-z]" "[']" nil
                       ("-B" "-d" "english" "--dict-dir"
                        "/Library/Application Support/cocoAspell/aspell6-en-6.0-0")
                       nil iso-8859-1)))
        `((nil ,@default)
          ("english" ,@default))))

指向正确的字典目录/Library/Application Support/cocoAspell/aspell6-en-6.0-0".我不知道为什么会出现错误以及如何修复它.

which points to the right dictionary directory "/Library/Application Support/cocoAspell/aspell6-en-6.0-0". I can't figure out why I got the error and how to fix it.

更新:

现在我已经删除了我的 GNU emacs 和 cocoAspell,并按照@katspaugh 的建议使用自制软件重新安装(和链接)了 emacs/aspell.我删除了上面显示的代码,只留下

Now I have removed my GNU emacs and cocoAspell, and re-installed (and linked) emacs/aspell using homebrew as @katspaugh suggested. I removed the code shown above, leave only

(setq ispell-program-name "aspell")

现在当我运行拼写检查时,我得到了

Now when I run spell check, I got

Searching for program: No such file or directory, aspell

我已经用brew link aspell链接了aspell,为什么还是找不到?

I have already linked aspell with brew link aspell, why it still cannot find it?

推荐答案

这是一个可行的解决方案:

Here's a working solution:

  • 安装Homebrew
  • brew install emacs --with-cocoa --with-gnutls
  • brew install aspell
  • open -a Emacs
  • M-x ispell

享受吧!

这篇关于mac os x 上的 emacs,如何进行拼写检查的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆