Снова я со своими проверками правописания.
Код, который работает на Win 10, но не работает на NixOS:
(setenv "LANG" "en_US, ru_RU")
(with-eval-after-load 'ispell
(setq ispell-program-name "hunspell"
ispell-dictionary "ru_RU,en_US")
(ispell-set-spellchecker-params)
(ispell-hunspell-add-multi-dic "en_US,ru_RU")
(ispell-hunspell-add-multi-dic "ru_RU,en_US"))
(require 'ispell)
(require 'flyspell)
(flyspell-mode +1)
(add-hook 'org-mode-hook 'turn-on-flyspell)
(add-hook 'tex-mode-hook 'turn-on-flyspell)
(add-hook 'latex-mode-hook 'turn-on-flyspell)
(add-hook 'ess-mode-hook 'turn-on-flyspell)
Сам hunspell словари видит:
$ hunspell -D
SEARCH PATH:
.::/usr/share/hunspell:/usr/share/myspell:/usr/share/myspell/dicts:/Library/Spelling:/home/art/.openoffice.org/3/user/wordbook:/home/art/.openoffice.org2/user/wordbook:/home/art/.openoffice.org2.0/user/wordbook:/home/art/Library/Spelling:/opt/openoffice.org/basis3.0/share/dict/ooo:/usr/lib/openoffice.org/basis3.0/share/dict/ooo:/opt/openoffice.org2.4/share/dict/ooo:/usr/lib/openoffice.org2.4/share/dict/ooo:/opt/openoffice.org2.3/share/dict/ooo:/usr/lib/openoffice.org2.3/share/dict/ooo:/opt/openoffice.org2.2/share/dict/ooo:/usr/lib/openoffice.org2.2/share/dict/ooo:/opt/openoffice.org2.1/share/dict/ooo:/usr/lib/openoffice.org2.1/share/dict/ooo:/opt/openoffice.org2.0/share/dict/ooo:/usr/lib/openoffice.org2.0/share/dict/ooo
AVAILABLE DICTIONARIES (path is not mandatory for -d option):
/home/art/Library/Spelling/ru_RU
/home/art/Library/Spelling/en_US
Emacs при запуске выдаёт вот такое:
Debugger entered--Lisp error: (wrong-type-argument stringp nil)
string-match("," nil 0)
split-string(nil "," t)
ispell-parse-hunspell-affix-file(nil)
ispell-find-hunspell-dictionaries()
ispell-set-spellchecker-params()
(lambda nil (setq ispell-program-name "hunspell" ispell-dictionary "ru_RU,en_US") (ispell-set-spellchecker-params) (ispell-hunspell-add-multi-dic "en_US,ru_RU") (ispell-hunspell-add-multi-dic "ru_RU,en_US"))()
eval-after-load-helper("/nix/store/vmjdh7477qszbbcrnwxsppp38galy73h-emacs-26.1/share/emacs/26.1/lisp/textmodes/ispell.elc")
run-hook-with-args(eval-after-load-helper "/nix/store/vmjdh7477qszbbcrnwxsppp38galy73h-emacs-26.1/share/emacs/26.1/lisp/textmodes/ispell.elc")
do-after-load-evaluation("/nix/store/vmjdh7477qszbbcrnwxsppp38galy73h-emacs-26.1/share/emacs/26.1/lisp/textmodes/ispell.elc")
require(ispell)
eval-buffer(#<buffer *load*> nil "/home/art/.emacs" nil t) ; Reading at buffer position 1406
load-with-code-conversion("/home/art/.emacs" "/home/art/.emacs" t t)
load("~/.emacs" t t)
#f(compiled-function () #<bytecode 0x25d5e9>)()
command-line()
normal-top-level()
Попробовал прописать в .emacs вот такое:
(setq ispell-dictionary-alist
'(("en_US,ru_RU" "[[:alpha:]]" "[^[:alpha:]]" "" t ("-d" "en_US,ru_RU") nil utf-8) ("default") ("en_US") ("en_US" "[[:alpha:]]" "[^[:alpha:]]" "['0-9]" t ("-d" "en_US") nil utf-8) ("ru_RU") ("russianw") ("russian") ("english") ("british") ("american") (nil "[[:alpha:]]" "[^[:alpha:]]" "['0-9]" t ("-d" "en_US") nil utf-8) ("hebrew" "[àáâãäåæçèéëêìîíðïñòôó÷öõøùú]" "[^àáâãäåæçèéëêìîíðïñòôó÷öõøùú]" "" nil ("-B" "-d" "he_IL") nil utf-8) ...)
)
Ничего не изменилось.
Мне кажется, что emacs не видит мои словари. Подскажите, пожалуйста, как правильно завести проверку орфографии под NixOS.