【发布时间】:2019-10-19 03:36:29
【问题描述】:
我已经下载了带有 brew 命令的 hunspell,并想在 Emacs 中使用它,但 hunspell 似乎没有在 ~/Library/Spelling 中找到我的 *.aff 和 *.dic 文件,即使它们在那里。
用命令行命令hunspell -D,结果是:
SEARCH PATH:
.::/usr/share/hunspell:/usr/share/myspell:/usr/share/myspell/dicts:/Library/Spelling:/Users/macbook/.openoffice.org/3/user/wordbook:/Users/macbook/.openoffice.org2/user/wordbook:/Users/macbook/.openoffice.org2.0/user/wordbook:/Users/macbook/Library/Spelling:/opt/openoffice.org/basis3.0/share/dict/ooo:/usr/lib/openoffice.org/basis3.0/share/dict/ooo:/opt/openoffice.org2.4/share/dict/ooo:/usr/lib/openoffice.org2.4/share/dict/ooo:/opt/openoffice.org2.3/share/dict/ooo:/usr/lib/openoffice.org2.3/share/dict/ooo:/opt/openoffice.org2.2/share/dict/ooo:/usr/lib/openoffice.org2.2/share/dict/ooo:/opt/openoffice.org2.1/share/dict/ooo:/usr/lib/openoffice.org2.1/share/dict/ooo:/opt/openoffice.org2.0/share/dict/ooo:/usr/lib/openoffice.org2.0/share/dict/ooo
AVAILABLE DICTIONARIES (path is not mandatory for -d option):
/Users/macbook/Library/Spelling/cs_CZ
这里,cs_CZ 是存储我个人拼写的文件的名称。该文件夹中还有其他文件,包括cs_CZ.aff 和cs_CZ.dic,以及en_GB,但hunspell 只是忽略了这些。
在 Emacs 中,我尝试过:
(setenv "DICPATH"
(concat (getenv "HOME") "/Library/Spelling"))
(when (executable-find "hunspell")
(setq-default ispell-program-name "hunspell")
(setq ispell-really-hunspell t))
使用推荐的输入“czech”运行 ispell-change-dictinary 后,ispell-word 给出:
使用捷克语词典启动新的 Ispell 进程 hunspell... ispell-init-process:无法打开词缀或字典文件 字典名为“捷克语”。
...和flyspell模式:
启用 Flyspell 模式时出错:(无法打开词缀或字典文件 对于名为“czech”的字典。)
谢谢。
【问题讨论】:
标签: macos emacs hunspell spelling