I use flyspell hunspell for checking my spelling mistakes in Emacs. Recently, when I run M-x flyspell-mode in .org or .tex files I got the following error:

Error enabling Flyspell mode:
 (hunspell exited with signal  Abort trap: 6)

I didn't get this error in the past, and I think I have changed nothing from my config.

My .emacs file for latex, ispell and hunspell are:

(setq TeX-auto-save t)
(setq TeX-parse-self t)
(setq-default TeX-master nil)

(setq ispell-program-name "hunspell") ;; Dictionaries
(add-hook 'LaTeX-mode-hook 'visual-line-mode)
(add-hook 'LaTeX-mode-hook 'LaTeX-math-mode)
(add-hook 'LaTeX-mode-hook 'TeX-source-correlate-mode)

(add-hook 'LaTeX-mode-hook 'turn-on-reftex)
(setq reftex-plug-into-AUCTeX t)
(setq TeX-PDF-mode t)

(setq TeX-output-view-style
     (("^pdf$" "." "evince -f %o")
      ("^html?$" "." "iceweasel %o"))))

;;ispell config
(setenv "PATH" (concat (getenv "PATH") ":/usr/local/bin"))
(setq exec-path (append exec-path '("/usr/local/bin")))

How can I debug this?


I solved the problem by:

  1. upgrade brew

  2. removing:

(setq ispell-program-name "hunspell") ;; Dictionaries

;;ispell config
(setenv "PATH" (concat (getenv "PATH") ":/usr/local/bin"))
(setq exec-path (append exec-path '("/usr/local/bin")))
  1. and adding:
(setq ispell-program-name "hunspell")
(setq ispell-local-dictionary "en_GB")
(setq ispell-local-dictionary-alist
      '(("en_GB" "[[:alpha:]]" "[^[:alpha:]]" "[']" nil nil nil utf-8)))

1 Answer 1


Why do you have to specify the environment paths? Doesn't your aspell work when you type aspell --version in your terminal? In any case, this is my flyspell configuration:

;; Spell-check
(require 'flyspell)
(setq flyspell-issue-message-flag nil
      ispell-local-dictionary "en_GB"
      ispell-program-name "aspell"
      ispell-extra-args '("--sug-mode=ultra"))

(add-hook 'text-mode-hook 'flyspell-mode)
(add-hook 'prog-mode-hook 'flyspell-prog-mode)

Sorry, didn't realise you were using hunspell. I think aspell is the preferred utility. You have to install aspell separately from your terminal and install the required dictionary as well.

  • I am not sure but I think aspell is no longer maintained. Anyway I have already solved my issue. Thanks.
    – Irbin B.
    Feb 17, 2019 at 4:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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