[Nix-dev] Emacs with Aspell and non-English languages
Ludovic Courtès
ludo at gnu.org
Wed Aug 13 15:25:27 CEST 2008
Hello,
For those interested, I found they way to get around Emacs' annoying
"ispell and its process have different character maps", which basically
made it impossible for ispell/flyspell to spell-check accented
characters.
The root of the problem is that the Aspell dictionaries that we have in
Nixpkgs are UTF-8-encoded, while Emacs' default is Latin-1 (see
`ispell-dictionary-alist'). The following snippet fixes it:
(setq my-utf8-aspell-dictionnaries
"^\\(francais\\|esperanto\\|castellano\\)")
(setq ispell-dictionary-alist
(mapcar (lambda (dict)
(let ((name (car dict)))
(if (and (stringp name)
(string-match my-utf8-aspell-dictionnaries
name))
(reverse (cons 'utf-8 (cdr (reverse dict))))
dict)))
ispell-dictionary-alist))
Not sure how we could make it work "out of the box" on NixOS.
Thanks,
Ludo'.
More information about the nix-dev
mailing list