Hunspell (ispell) in emacs buffer doesn't work properly

0

In my init.el i have

(setenv "DICPATH" (concat "$HOME" ".hunspell-dics"))
(setq ispell-program-name "/usr/bin/hunspell")
(setq ispell-really-aspell nil)
(setq ispell-really-hunspell t)
(setq ispell-local-dictionary-alist
    '(("russian"
    "[АБВГДЕЁЖЗИЙКЛМНОПРСТУФХЦЧШЩЬЫЪЭЮЯабвгдеёжзийклмнопрстуфхцчшщьыъэюя]"
    "^[АБВГДЕЁЖЗИЙКЛМНОПРСТУФХЦЧШЩЬЫЪЭЮЯабвгдеёжзийклмнопрстуфхцчшщьыъэюя]"
    "[-]" nil ("-d" "ru_RU") nil utf-8)
    ("english"
    "[A-Za-z]"
    "[^A-Za-z]"
    "[']" nil ("-d" "en_US") nil utf-8))
    )

This config looks like normal, but ispell-buffer and flyspell-buffer works in a very strange way. For example, in a .tex file (latex mode) i have a preamble and a main text in a document environment. If i command ispell to check buffer or even check region ispell leaves the text in the document environment unchecked. All the other parts of the document ispell checks without a question. I double checked ispell language and it was set properly (russian). So the question is how to make ispell-buffer/flyspell-buffer check all the document from the first until the last string?

For example

\documentclass[12pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[russian]{babel}
\begin{document}
some text
\end{document}

Area with "some text" always leaved unchecked. No matter what language i use or what latex commands inside it. Everything stays untouched.

P.S. hunspell -d "ru_RU" from terminal checks the document properly.

HDDW

Posted 2019-01-20T15:10:53.080

Reputation: 1

Just found that aspell works perfectly with the same document. Now i have more questions... – HDDW – 2019-01-20T17:03:05.303

Answers

0

Got it. For some reason hunspell when works through emacs doesn't use dictionaries in KOI8-R. I replace my dictionaries with utf-8 versions and all becomes normal.

HDDW

Posted 2019-01-20T15:10:53.080

Reputation: 1