still have some problem to configure emacs:

I use orgmode to write principally in italian, but also in english. So i want to use flyspell to check either language. I google and i find this blog. After i launch brew install hunspell, downloaded the dictionary files and run hunspell -D, i modify my configuration.org file like this:

EDIT: i rewrite the code to include ispell-dictionary-alist

Enable spell-checking in Org-mode.

#+BEGIN_SRC emacs-lisp
   (add-hook 'org-mode-hook 'flyspell-mode)

setting flyspell in all my language by using hunspell

#+BEGIN_SRC emacs-lisp
 (require 'ispell)
 (setq-default ispell-program-name (executable-find "hunspell")
           ispell-dictionary "it_IT")
 (setq ispell-dictionary-alist
 (append '(("italian"
      "[---']" t nil "~iso" iso-latin-1)
      "[A-Za-z]" "[^A-Za-z]" "[']" nil
      ("-d" "en_GB") nil utf-8))
 (setq ispell-menu-map nil)
 (load-library "ispell")
 (eval-after-load "ispell"
 (setq ispell-dictionary "english"
      ispell-extra-args '("-a" "-i" "utf-8")
      ispell-silently-savep t)))

    (bind-key "C-c ì"
            (lambda ()
              (ispell-change-dictionary "it_IT")

  (bind-key "C-c è"
            (lambda ()
              (ispell-change-dictionary "en_GB")

But when i start emacs doesn't work flyspell, if i tipe C-c ì it say wrong type argument:stringp,nil and if i type C-c è it return Undefined dictionary: en_GB. Guesses?

EDIT: now the bind work, also code compile correctly, but when i change dictionary emacs say Undefine dictionary: yada_YADA with each of two dictionaries.

  • The code looks good so far. Maybe, you bind C-c i to some other command later on in your config file. Find the real binding with C-h k C-c i. Furthermore, it looks like you don't have en_GB in your ispell-dictionary-alist.
    – Tobias
    Jul 14 '18 at 11:34
  • To not interfire with other function i use accented letter (easi to entry in italian layout). Thankyou for the command C-h k it will be very usefull. The shorcut are very usefull. The binds return the function i define above. Did i need to include ispell-dictionary-alist even if i use hunspell? Jul 14 '18 at 13:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.