[voikko] Emacs + wcheck-mode + voikko ei toimi Ubuntu 12.04:ssä
Teemu Likonen
tlikonen at iki.fi
Wed Jun 6 11:18:45 EEST 2012
Hannu Väisänen kirjoitti 6.6.2012 klo 8.45:
> Päätteeltä annettu komento
> enchant -a -d fi
> sanoo
> Couldn't create a dictionary for fi
En osaa Enchantia korjata, mutta ehkä voisi testata voikkospell-
ohjelmalla, onko Voikko muuten on kunnossa.
Wcheck-moden voi toki asettaa käyttämään suoraan voikkospelliä. Alla
ovat esimerkkiasetukset sitä varten.
;;; Wcheck-moden kieliasetukset
(setq wcheck-language-data
;; voikkospell-ohjelma on paketissa libvoikko-dev
("voikkospell"
(program . "/usr/bin/voikkospell")
(args "ignore_dot=1")
(parser . wcheck-parser-voikkospell)
(regexp-discard . "\\`[.'-]+\\'")
(syntax . voikko-syntax-table)
(action-program . "/usr/bin/voikkospell")
(action-args "-s" "ignore_dot=1")
(action-parser . wcheck-parser-voikkospell-suggestions)))
(defun wcheck-parser-voikkospell-engine (prefix)
(let (words)
(while (re-search-forward prefix nil t)
(push (buffer-substring-no-properties
(point) (line-end-position))
words))
words))
(defun wcheck-parser-voikkospell ()
(wcheck-parser-voikkospell-engine "^W: "))
(defun wcheck-parser-voikkospell-suggestions (&rest ignored)
(wcheck-parser-voikkospell-engine "^S: "))
(setq voikko-syntax-table (copy-syntax-table text-mode-syntax-table))
(dolist (i '((?- . "w") (?% . ".") (?$ . ".") (?. . "w")))
(modify-syntax-entry (car i) (cdr i) voikko-syntax-table))
More information about the voikko
mailing list