[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: About multiple spelling in Emacs
From: |
Gustavo Barros |
Subject: |
Re: About multiple spelling in Emacs |
Date: |
Mon, 11 May 2020 08:41:49 -0300 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) |
Hi Angelo,
On Mon, May 11 2020, Angelo Graziosi wrote:
>> Il 10 maggio 2020 alle 18.08 Eli Zaretskii ha scritto:
>>
>> > Date: Sun, 10 May 2020 17:51:50 +0200 (CEST)
>> > From: Angelo Graziosi
>> >
>> > I see that some browser allow for spelling in two languages (say italian
>> > and english). Can we do the same in Emacs? How?
>>
>> You mean, spell-checking text that mixes 2 languages? That's possible
>> with Hunspell, yes.
>
> But, how? How can I instruct Emacs to use two dictionaries, say Italian and
> English?
>
> TIA
It is indeed possible with hunspell, as Eli mentioned. I use the
following settings for this:
#+begin_src emacs-lisp
(use-package ispell
:custom
(ispell-program-name "hunspell")
(ispell-dictionary "en_US,pt_BR")
:config
;; from https://emacs.stackexchange.com/a/21379/18951
(ispell-set-spellchecker-params)
(ispell-hunspell-add-multi-dic "en_US,pt_BR"))
#+end_src
It works very well for me.
You might interested in a recent thread about spell-checking at Reddit:
https://www.reddit.com/r/emacs/comments/fxs92h/spell_checkers_in_emacs_in_2020/
Using multiple dictionaries was also discussed there. In particular, I
received nice tips from Alan Third on how to fine tune hunspell for the
case quote contractions (common in English) with curly quotes and
multiple dictionaries.
HTH,
Gustavo.