GNU bug report logs - #50241
flyspell doesn't work with multiple dictionaries

Previous Next

Package: emacs;

Reported by: Konstantin Kharlamov <hi-angel <at> yandex.ru>

Date: Sat, 28 Aug 2021 18:35:02 UTC

Severity: normal

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Konstantin Kharlamov <hi-angel <at> yandex.ru>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 50241 <at> debbugs.gnu.org
Subject: bug#50241: flyspell doesn't work with multiple dictionaries
Date: Sat, 28 Aug 2021 23:02:41 +0300
On Sat, 2021-08-28 at 22:45 +0300, Konstantin Kharlamov wrote:
> On Sat, 2021-08-28 at 22:36 +0300, Eli Zaretskii wrote:
> > > From: Konstantin Kharlamov <hi-angel <at> yandex.ru>
> > > Cc: 50241 <at> debbugs.gnu.org
> > > Date: Sat, 28 Aug 2021 22:05:55 +0300
> > > 
> > > On Sat, 2021-08-28 at 21:56 +0300, Eli Zaretskii wrote:
> > > > 
> > > > You miss this step at the end:
> > > > 
> > > >   (ispell-change-dictionary "ru_RU,en_US")
> > > > 
> > > > It tells Emacs to restart Hunspell with these two dictionaries.
> > > 
> > > Thank you! Running this command results in error:
> > > 
> > >         (error "Undefined dictionary: ru_RU,en_US")
> > 
> > Strange.  Here, it doesn't error out.  I did this:
> > 
> >   M-x flyspell-mode RET
> >   M-x ispell-hunspell-add-multi-dic RET ru_RU,en_US RET
> >   M-x ispell-change-dictionary RET ru_RU,en_US RET
> > 
> > And I don't get any errors, and flyspell-mode works for both Russian
> > and English.
> 
> Thank you! With a little modification for steps to be:
> 
>   M-x flyspell-mode RET
>   M-: (setq ispell-program-name "hunspell")
>   M-x ispell-hunspell-add-multi-dic RET ru_RU,en_US RET
>   M-x ispell-change-dictionary RET ru_RU,en_US RET
> 
> this worked for me! Hmm, let me try to experiment with that a bit to see why
> it
> didn't work for me non-interactively…

Okay, so the bug seems to be in ispell-hunspell-add-multi-dic function. When called interactively, then the following interactive call to (ispell-change-dictionary) has the ru_RU,en_US dictionary as a completion. However, if ispell-hunspell-add-multi-dic was called non-interactively, the completion from the subsequent (ispell-change-dictionary) call seems to be missing.

Not sure though why the difference in behaviour, the "interactive" part of that function look innocent, simply (interactive "sPrompt"). Not sure what starting "s" means though.





This bug report was last modified 3 years and 317 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.