help-emacs-windows
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [h-e-w] Can't open affix or dictionary flies


From: Oliver Jones
Subject: Re: [h-e-w] Can't open affix or dictionary flies
Date: Fri, 11 Jan 2013 10:11:31 +0100
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.2.15) Gecko/20110303 Lightning/1.0b2 Thunderbird/3.1.9

Am 10.01.2013 20:47, schrieb Eli Zaretskii:
Date: Thu, 10 Jan 2013 17:35:16 +0100
From: Oliver Jones<address@hidden>

I have trouble getting spellchecking to work with Emacs 24.2.1 and Hunspell 
1.3.2 on Windows XP.

I have read the help about spelling in the built in manual and searched the 
internet where I
found advice to include these lines to my ~/.emacs.d/init.el file.

(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)
                 ^                                                              
                    ^
Those single quotes inside double quotes look suspicious.  They don't
belong to the file name.

Also, you don't need "-i" "utf-8" in the list of arguments, since that
is the default.

Finally, I'd suggest to use dictionary names that are identical to the
file names, i.e. "de_DE_frami" instead of "german" etc.  Then you
could simply use nil for all the switches (assuming you install the
dictionaries in the directory where hunspell expects to find them).



Hi Eli,

thanks for your help.
I made sure the dictionary and affix files are saved in a place where hunspell finds them (I verified that by executing hunspell on the command line). I changed the text in my init.el to:

(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")

Now when I start ispell by M-x ispell there is no error message and I see an ispell process using M-x list-processes:
Process: ispell
Status:  run
Buffer:  --
TTY:     --
Command: C:\Dokumente und Einstellungen\...\hunspell.exe -a  -d de_DE_frami -i 
nil -a -i utf-8

But it dosen't work as far as I can tell. No words are identified as misspelled (I included some for testing purpose).
When I turn on flyspell by M-x flyspell-mode there is this error message:
Error in post-command-hook (flyspell-post-command-hook): (error "No data for dictionary \"de_DE_frami\", neither in `ispell-local-dictionary-alist' nor in `ispell-dictionary-alist'")

Checking that the variable ispell-dicationary-alist contains what is specified in my init-el by typing ispell-dicationary-alist in the scratch buffer and pressing C-j at the end of that line, this unexpected text:

(("hebrew" "[\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\344\345\346\347\350\351\353\352\354\356\355\360\357\361\362\364\363\367\366\365\370\371\372]" "" nil ("-B") nil cp1255) ("svenska" "[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\305\304\326\311\300\334\310\306\330\307]" "[']" nil ("-C") "~list" iso-8859-1) ("slovenian" "[A-Za-z\301\304\311\315\323\332\324\300\305\245\335\256\251\310\317\253\322\341\344\351\355\363\372\364\340\345\265\375\276\271\350\357\273\362]" "[^A-Za-z\301\304\311\315\323\332\324\300\305\245\335\256\251\310\317\253\322\341\344\351\355\363\372\364\340\345\265\375\276\271\350\357\273\362]" "" nil ("-B" "-d" "slovenian") nil iso-8859-2) ("slovak" "[A-Za-z\301\304\311\315\323\332\324\300\305\245\335\256\251\310\317\253\322\341\344\351\355\363\372\364\340\345\265\375\276\271\350\357\273\362]" "[^A-Za-z\301\304\311\315\323\332\324\300\305\245\335\256\251\310\317\253\322\341\344\351\355\363\372\364\340\345\265\375\276\271\350\357\273\362]" "" nil ("-B") nil iso-8859-2) ("russianw" "[\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]" "[^\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]" "" nil nil nil windows-1251) ("russian" "[\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]" "[^\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]" "" nil nil nil koi8-r) ("portugues" "[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\363\343\347\372]" "[']" t ("-C") "~latin1" iso-8859-1) ("polish" "[A-Za-z\241\243\246\254\257\261\263\266\274\277\306\312\321\323\346\352\361\363]" "[^A-Za-z\241\243\246\254\257\261\263\266\274\277\306\312\321\323\346\352\361\363]" "[.]" nil nil nil iso-8859-2) ("norsk7-tex" "[A-Za-z{}\\'^`]" "[^A-Za-z{}\\'^`]" "[\"]" nil ("-d" "norsk") "~plaintex" iso-8859-1) ("norsk" "[A-Za-z\305\306\307\310\311\322\324\330\345\346\347\350\351\362\364\370]" "[^A-Za-z\305\306\307\310\311\322\324\330\345\346\347\350\351\362\364\370]" "[\"]" nil nil "~list" iso-8859-1) ("nederlands8" "[A-Za-z\300\301\302\303\304\305\307\310\311\312\313\314\315\316\317\322\323\324\325\326\331\332\333\334\340\341\342\343\344\345\347\350\351\352\353\354\355\356\357\361\362\363\364\365\366\371\372\373\374]" "[^A-Za-z\300\301\302\303\304\305\307\310\311\312\313\314\315\316\317\322\323\324\325\326\331\332\333\334\340\341\342\343\344\345\347\350\351\352\353\354\355\356\357\361\362\363\364\365\366\371\372\373\374]" "[']" t ("-C") nil iso-8859-1) ("nederlands" "[A-Za-z\300\301\302\303\304\305\307\310\311\312\313\314\315\316\317\322\323\324\325\326\331\332\333\334\340\341\342\343\344\345\347\350\351\352\353\354\355\356\357\361\362\363\364\365\366\371\372\373\374]" "[^A-Za-z\300\301\302\303\304\305\307\310\311\312\313\314\315\316\317\322\323\324\325\326\331\332\333\334\340\341\342\343\344\345\347\350\351\352\353\354\355\356\357\361\362\363\364\365\366\371\372\373\374]" "[']" t ("-C") nil iso-8859-1) ...)

It is unexpected because when I start emacs and check if my init.el was loaded and correctly specified ispell-dictionary-alist I get this after ispell-dictionary-alist C-j

((nil "[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))

Hope this helps to track the problem down.

Kind regards
Oliver




reply via email to

[Prev in Thread] Current Thread [Next in Thread]