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

Re: Emacs and hunspell





On Thu, 28 Mar 2019 at 23:50, Alfredo Finelli <alf@computationes.de> wrote:

This is how I managed to make it work for me; what follows is in my
init.el file:

Thanks Alfredo.
 
This bug seems to bite me.  Emacs does not seem to get the dictionaries.  If I have aspell as  an installed package it seems to use it despite my configuration :
 
;;-- Spelling --
  (with-eval-after-load "ispell"
    (setq ispell-program-name (executable-find "hunspell")
          ispell-skip-html t
          ispell-local-dictionary-alist
          '(
        ("en_ZA" "[[:alpha:]]" "[^[:alpha:]]" "[']"
             nil ("-d" "en_ZA") nil utf-8)
            ("af_ZA" "[[:alpha:]]" "[^[:alpha:]]" "[']"
             nil ("-d" "af_ZA") nil utf-8)
            ("nl_NL" "[[:alpha:]]" "[^[:alpha:]]" "[']"
             nil ("-d" "nl_NL") nil utf-8)
              ("de_DE" "[[:alpha:]]" "[^[:alpha:]]" "[-]"
             nil ("-d" "de_DE") nil utf-8),
          ("af_ZA,en_ZA" "[[:alpha:]]" "[^[:alpha:]]" "[']"
             nil ("-d" "af_ZA,en_ZA") nil utf-8)
        )
        ispell-dictionary "af_ZA,en_ZA"))

Emacs complains about the last line:
Debugger entered--Lisp error: (error "No data for dictionary \"en_ZA,af_ZA\" in ‘ispell-local-dictionary-alist’ or ‘ispell-dictionary-alist’")
  signal(error ("No data for dictionary \"en_ZA,af_ZA\" in ‘ispell-local-dictionary-alist’ or ‘ispell-dictionary-alist’"))
  error("No data for dictionary \"%s\" in `ispell-local-dictionary-alist' or `ispell-dictionary-alist'" "en_ZA,af_ZA")

But from the commandline I can use it:
$ hunspell -d "af_ZA,en_ZA" .emacs

Anyhow there is progress.  I can at least use one dictionary at a time.

Thanks again.

Johann
--


Because experiencing your loyal love is better than life itself,
my lips will praise you.  (Psalm 63:3)

Reply to: