0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

emacs で spellcheck (hunspell)

Last updated at Posted at 2022-12-17

emacs で spellcheck といえば ispell ですが、今は hunspell というのがいいらしい。

$brew install hunspell
(use-package ispell
  :custom
  (ispell-program-name "hunspell")
  (ispell-really-hunspell t)

ispell, flyspell で error になる。

Error enabling Flyspell mode:
(Can't find Hunspell dictionary with a .aff affix file)

commandline でも error になる。

$hunspell -d en_US hoge.txt
Can't open affix or dictionary files for dictionary named "en_US".

辞書を dl して mv する

$wget -O en_US.aff https://cgit.freedesktop.org/libreoffice/dictionaries/plain/en/en_US.aff?id=a4473e06b56bfe35187e302754f6baaa8d75e54f
$wget -O en_US.dic https://cgit.freedesktop.org/libreoffice/dictionaries/plain/en/en_US.dic?id=a4473e06b56bfe35187e302754f6baaa8d75e54f
$mv en_US.* Library/Spelling/

環境変数 DICTIONARY に en_US

(use-package ispell
  :custom
  (ispell-program-name "hunspell")
  (ispell-really-hunspell t)
  :config
  (setenv "DICTIONARY" "en_US")

ok.

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?