From: Konstantin Kharlamov <hi-angel@yandex.ru>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 50241@debbugs.gnu.org
Subject: bug#50241: flyspell doesn't work with multiple dictionaries
Date: Sat, 28 Aug 2021 23:26:28 +0300 [thread overview]
Message-ID: <d93f0015fc160da3491ab46f48404f48766aab27.camel@yandex.ru> (raw)
In-Reply-To: <a2f0bf50c69169d7d53598d318fd353a47665da4.camel@yandex.ru>
On Sat, 2021-08-28 at 23:19 +0300, Konstantin Kharlamov wrote:
> On Sat, 2021-08-28 at 23:02 +0300, Konstantin Kharlamov wrote:
> > 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@yandex.ru>
> > > > > Cc: 50241@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.
>
> Okay, so, I figured there's some sort of odd cooperation between (ispell-
> hunspell-add-multi-dic) and (ispell-change-dictionary) going on.
>
> When the first is called non-interactively, interactive call to the second
> results in no completion for the new dict, right? So, the fun thing is that if
> you abort prompt afterwards, then you call (ispell-hunspell-add-multi-dic)
> again, and then you call (ispell-change-dictionary) interactively again, the
> prompt will have the completion.
>
> It looks as if call to (ispell-change-dictionary) initializes some important
> variable required by (ispell-hunspell-add-multi-dic) to function properly.
…and, the function that needs to be called before (ispell-hunspell-add-multi-dic "ru_RU,en_US") is (ispell-valid-dictionary-list)
next prev parent reply other threads:[~2021-08-28 20:26 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-28 18:33 bug#50241: flyspell doesn't work with multiple dictionaries Konstantin Kharlamov
2021-08-28 18:56 ` Eli Zaretskii
2021-08-28 19:05 ` Konstantin Kharlamov
2021-08-28 19:35 ` Konstantin Kharlamov
2021-08-28 19:36 ` Eli Zaretskii
2021-08-28 19:45 ` Konstantin Kharlamov
2021-08-28 20:02 ` Konstantin Kharlamov
2021-08-28 20:19 ` Konstantin Kharlamov
2021-08-28 20:26 ` Konstantin Kharlamov [this message]
2021-08-28 20:42 ` Konstantin Kharlamov
2021-08-29 6:12 ` Eli Zaretskii
2021-08-29 12:43 ` Konstantin Kharlamov
2021-08-29 13:07 ` Eli Zaretskii
2021-08-29 19:50 ` Lars Ingebrigtsen
2021-08-30 2:24 ` Eli Zaretskii
2021-08-30 2:27 ` Lars Ingebrigtsen
2021-08-30 12:49 ` Eli Zaretskii
[not found] ` <handler.50241.B.163017564419363.ack@debbugs.gnu.org>
2021-08-28 18:59 ` bug#50241: Acknowledgement (flyspell doesn't work with multiple dictionaries) Konstantin Kharlamov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d93f0015fc160da3491ab46f48404f48766aab27.camel@yandex.ru \
--to=hi-angel@yandex.ru \
--cc=50241@debbugs.gnu.org \
--cc=eliz@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).