Windows emacs和hunspell-Can';不要打开词缀或字典文件

Windows emacs和hunspell-Can';不要打开词缀或字典文件,windows,emacs,hunspell,Windows,Emacs,Hunspell,我无法在Windows XP上使用Emacs 24.2.1和Hunspell 1.3.2进行拼写检查 我已经阅读了内置手册中关于拼写的帮助,并搜索了internet,在那里我找到了将这些行包含到我的~/.emacs.d/init.el文件中的建议 (setq ispell-dictionary-alist '((nil ; default "[a-zäöüßA-ZÄÖÜ]" "[^a-zäöüßA-ZÄÖÜ]" "[']" t ("-d" "C:\\Dokument

我无法在Windows XP上使用Emacs 24.2.1和Hunspell 1.3.2进行拼写检查

我已经阅读了内置手册中关于拼写的帮助,并搜索了internet,在那里我找到了将这些行包含到我的
~/.emacs.d/init.el
文件中的建议

(setq ispell-dictionary-alist
   '((nil ; default
      "[a-zäöüßA-ZÄÖÜ]" "[^a-zäöüßA-ZÄÖÜ]" "[']" t
      ("-d" "C:\\Dokumente und Einstellungen\\ojones\\Eigene Dateien\\dictionaries\\de_DE_frami" "-i" "utf-8") nil utf-8)
     ("english"
      "[A-Za-z]" "[^A-Za-z]" "[']" nil
      ("-d" "en_GB") nil utf-8)
     ("german"
      "[a-zäöüßA-ZÄÖÜ]" "[^a-zäöüßA-ZÄÖÜ]" "[']" t
      ("-d" "'C:\\Dokumente und Einstellungen\\ojones\\Eigene Dateien\\dictionaries\\de_DE_frami'" "-i" "utf-8") nil utf-8)
     ("british"
      "[A-Za-z]" "[^A-Za-z]" "[']" nil
      ("-d" "en_GB") nil utf-8)))
(eval-after-load "ispell"
    (progn
      (setq ispell-dictionary "german"
        ispell-extra-args '("-a" "-i" "utf-8") ; aspell doesn't understand -i utf-8, hunspell needs it
        ispell-silently-savep t)))
(setq ispell-program-name "C:\\Dokumente und Einstellungen\\ojones\\Eigene Dateien\\hunspell-mingw-1.3.2-win32\\bin\\hunspell.exe")
在这里,我更改了词缀和字典文件以及hunspell.exe的路径

通过在命令行上执行,我验证了hunspell是否有效

当我在emacs中键入
M-x ispell
时,我收到以下错误消息

无法打开名为“德语”的词典的词缀或词典。\br> @(#)国际Ispell版本3.2.06(但实际上是1.3.2)
@(#)国际Ispell版本3.2.06(但实际上是1.3.2)


我尝试将init.el中词缀和字典文件的路径更改为词缀和dic名称,即
“de_de_frami”
,因为hunspell知道在哪里可以找到它们,但在emacs中没有帮助。

字符串文本中的单个反斜杠肯定是错误的:在elisp中,它们是转义符,或者给下面的字符赋予特殊的含义,或者引用该字符


\
替换为
\
“C:\\Dokumente…..”
。通过C-h v
ispell dictionary alist
输入并检查'ispell dictionary alist'的值,确保确实加载了
init.el

字符串文本中的单个反斜杠肯定是错误的:在elisp中,它们是转义符,或者为以下字符指定特殊含义,或者引用那个角色


\
替换为
\
“C:\\Dokumente…..”
。通过C-h v
ispell dictionary alist
输入并检查'ispell dictionary alist'的值,确保您的
init.el
确实已加载。我对我的init.el做了一些更改,现在不再显示无法打开词缀和字典文件的错误消息。但我有一个新的错误

这是我修改的init.el

(setq ispell-dictionary-alist
 '((nil ; default 
    "[a-zäöüßA-ZÄÖÜ]" "[^a-zäöüßA-ZÄÖÜ]" "[']" t
    ("-d" "de_DE_frami") nil utf-8)
   ("en_GB"
    "[A-Za-z]" "[^A-Za-z]" "[']" nil
    ("-d" "en_GB") nil utf-8)
   ("de_DE_frami"
    "[a-zäöüßA-ZÄÖÜ]" "[^a-zäöüßA-ZÄÖÜ]" "[']" t
    ("-d" "de_DE_frami") nil utf-8)))
(eval-after-load "ispell"
  (progn
    (setq ispell-dictionary "de_DE_frami"
          ispell-extra-args '("-a" "-i" "utf-8") ; aspell doesn't understand -i utf-8, hunspell needs it
          ispell-silently-savep t)))
(setq ispell-program-name "C:\\Dokumente und Einstellungen\\ojones\\Eigene Dateien\\hunspell-mingw-1.3.2-win32\\bin\\hunspell.exe")
我将ispell词典中的词典名称改为它们已有的名称,例如,我将“德语”改为“德语”。我确保字典和词缀文件保存在hunspell找到它们的地方(我通过在命令行上执行hunspell验证了这一点)

现在,当我通过
M-x ispell
启动ispell时,没有错误消息,我看到使用
M-x列表进程的ispell进程

进程:ispell

状态:运行

缓冲区:--

TTY:--

命令:C:\Dokumente und Einstellungen…\hunspell.exe-a-d de_de_frami-i nil-a-i utf-8

但据我所知,它不起作用。没有单词被识别为拼写错误(我包括了一些用于测试的单词)。 当我通过
M-x flyspell模式
打开flyspell时,出现以下错误消息:

post命令钩子(flyspell post命令钩子)中出错:(错误“字典\“de_de_frami\”中没有数据,无论是在“ispell local dictionary alist”还是在“ispell dictionary alist”中都没有数据)

通过在暂存缓冲区中键入“ispell indicationary alist”并按该行末尾的
C-j
,检查变量ispell indicationary alist是否包含在我的init el中指定的内容,我得到以下意外文本:

(“希伯来语”[\340\341\342\343\344\345\346\347\350\351\353\352\354\356\355\360\357\361\362\364\363\367\366\365\370\371\372]“[^\340\341\342\343\343\344\345\346\347\350\351\353\352\354\356\355\355\360\357\367\361\362\364\363\363\367\367\367\367\362]“尼尔卡”(“尼尔卡”)尼尔卡[A-Za-z\345\344\366\351\340\374\350\346\370\347\305\304\326\311\300\334\310\306\330\307]“[^A-Za-z\345\344\366\351\340\374\350\346\370\347\304\326\311\300\334\310\306\307]“无”(-C“~list”iso-8859-1)(“斯洛文尼亚语”[A-扎扎扎扎扎扎扎扎扎扎扎扎扎扎扎扎扎扎扎扎扎扎扎扎扎扎扎扎扎扎扎扎扎扎扎扎扎扎扎扎扎扎扎扎扎扎扎扎扎扎扎扎扎布\301\301\301\304\304\304\304\304\311\311\3\3\3\3\3\3\3\3\3\3\3\3\3 3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\无(“-B”-d“斯洛文尼亚语”)无iso-8859-2)(“斯洛伐克语”“A-A-扎扎扎扎扎扎扎扎扎扎扎扎扎扎扎扎扎扎扎扎扎扎扎扎扎扎扎布\301\301\304\304\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3 3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\“零”(-B)零iso-8859-2)(“俄罗斯西北航空公司”[\300\301\302\303\304\305\250\306\307\310\311\312\313\314\315\316\317\320\321\322\323\324\325\326\327\330\331\334\333\332\335\336\337\340\341\342\343\344\345\270\346\347\350\351\352\353\354\355\356\357\360\361\362\363\364\365\366\367\370\371\374\373\372\375\376\377]" "3\313\3 3\3 3\3 3\3 3\3 3\3 3 3\3 3 3\3 3 3 3\3 3 3\3 3 3\3 3 3\3 3 3\3 3 3\3 3 3\3 3 3 3\3 3 3 3 3\3 3 3 3 3 \ \ \3 3 3 3 3 3 3 3\3 3 3\3 3 3\3 3 3 3\3 3 3 3 3 3\3 3 3 3\3 3 3 3 3\3 3\3 3 3 3 3\3 3 3 3 3 3 3 3\3 3 3 3 3 3\3\3 3 3 3 3 3\3 3 3 3 3 3\3 3\3 3\3 3 3 3 3 3 3 3 3\3 3 3\3\3\3 3 3 3 3\3\3 3 3 3 3 3\3 3 3 3 3 3 3 3\3 3 3\3\3 3\3\3 3 3 3\3\3 3 3 3 3\3\3 3 3 3 3 3 3\3\(windows-1251)(“俄语”[\341\342\367\347\344\345\263\366\372\351\352\353\354\355\356\357\360\362\363\364\365\346\350\343\376\373\375\370\371\377\374\340\361\301\302\327\307\304\305\243\326\332\311\312\313\314\315\316\317\320\322\323\324\325\306\310\303\336\333\335\330\331\337\334\300\321]" "3 \\343 3 3 3 3433 3 3 3 3 3 3 3433 3 3 3 3 3 3 3\354\354\353 3\354\\353 3 3 3 3 3\\\\\343 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3\\\343 3 3 3 3 3 3 3 3 3 3 3\\\\343 3 3 3 3 3 3 3 3 3 3\\\\\\343 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3\\\\\\\\\\\\343 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3\\\\\\\\\\\\\\\\\343 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3(葡萄牙语)[a-zA-Z\301\302\307\311\323\340\341\342\351\352\355\363\343\347\372]“[^a-zA-Z\301\302\307\311\323\340\341\342\351\352\355\343\347\372]”[']t(“-C”)“~latin1”iso-88
(setq ispell-program-name "C:\\Dokumente und Einstellungen\\ojones\\Eigene Dateien\\hunspell-mingw-1.3.2-win32\\bin\\hunspell.exe")

(setq ispell-local-dictionary-alist
 '(("en_GB"
    "[[:alpha:]]"
    "[^[:alpha:]]"
    "[']" nil ("-r") nil utf-8)
   ("de_DE_frami"
    "[a-zäöüßA-ZÄÖÜ]" "[^a-zäöüßA-ZÄÖÜ]" "[']" nil
    ("-r") nil utf-8)))