I am writing in LaTeX at the moment and I want to use company-mode for word completion. I found this solution: https://emacs.stackexchange.com/a/18522.

I was thinking about using the ispell dictionary instead, then I can also switch to another language for other documents.

I tried the code below, but when trying with company-complete I just get No completion found with almost any word.

(require 'ispell)
(setq ispell-dictionary "en_US")

(require 'company)
(add-hook 'after-init-hook 'global-company-mode)
(add-to-list 'company-backends 'company-ispell)
(setq company-ispell-dictionary ispell-dictionary)

Does company-ispell only work with plain txt dictionaries?


You need provide a "plain word-list dictionary".

Step 1, Check the code of company-ispell, it actually calls ispell-lookup-words.

Step 2, check ispell-lookup-words documentation:

"Optional second argument contains the dictionary to use; the default is ‘ispell-alternate-dictionary’, overridden by ‘ispell-complete-word-dict’ if defined."

Step 3, check ispell-alternate-dictionary documentation:

"Alternate plain word-list dictionary for spelling help."

So binary dictionaries won't work.

  • Perfect explanation! Didn't come across the ispell-alternate-dictionary documentation. Thanks for helping me out! Seems that now I need to search for plain word-list dictionaries for my other languages. – Wuff Jul 11 '18 at 10:55

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.