From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Konstantin Kharlamov Newsgroups: gmane.emacs.bugs Subject: bug#50241: flyspell doesn't work with multiple dictionaries Date: Sun, 29 Aug 2021 15:43:30 +0300 Message-ID: References: <581ffd00b0c4a0762689a423aff0ee13b5c85e52.camel@yandex.ru> <83lf4lmm8k.fsf@gnu.org> <83k0k5mked.fsf@gnu.org> <8658b0b457b9fc41624b454a0534013173de37ce.camel@yandex.ru> <65a1ecacc7ae808fc6fbc204094375604352c4aa.camel@yandex.ru> <1b2e0b953b4036fe10d45451e6b1381fe8931eeb.camel@yandex.ru> <83h7f8n5hx.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33714"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Evolution 3.40.4 Cc: 50241@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Aug 29 14:44:14 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mKKAY-0008V8-AP for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 29 Aug 2021 14:44:14 +0200 Original-Received: from localhost ([::1]:60476 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mKKAW-0006UB-S5 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 29 Aug 2021 08:44:12 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53304) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mKKAM-0006U2-H1 for bug-gnu-emacs@gnu.org; Sun, 29 Aug 2021 08:44:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:44185) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mKKAM-0003xR-9s for bug-gnu-emacs@gnu.org; Sun, 29 Aug 2021 08:44:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mKKAM-0001GH-3X for bug-gnu-emacs@gnu.org; Sun, 29 Aug 2021 08:44:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Konstantin Kharlamov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 29 Aug 2021 12:44:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50241 X-GNU-PR-Package: emacs Original-Received: via spool by 50241-submit@debbugs.gnu.org id=B50241.16302410204814 (code B ref 50241); Sun, 29 Aug 2021 12:44:02 +0000 Original-Received: (at 50241) by debbugs.gnu.org; 29 Aug 2021 12:43:40 +0000 Original-Received: from localhost ([127.0.0.1]:55731 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mKKA0-0001Fa-IT for submit@debbugs.gnu.org; Sun, 29 Aug 2021 08:43:40 -0400 Original-Received: from forward105j.mail.yandex.net ([5.45.198.248]:55438) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mKK9y-0001FM-T6 for 50241@debbugs.gnu.org; Sun, 29 Aug 2021 08:43:39 -0400 Original-Received: from iva5-8cd627e71aff.qloud-c.yandex.net (iva5-8cd627e71aff.qloud-c.yandex.net [IPv6:2a02:6b8:c0c:7b87:0:640:8cd6:27e7]) by forward105j.mail.yandex.net (Yandex) with ESMTP id C07154EC8A42; Sun, 29 Aug 2021 15:43:31 +0300 (MSK) Original-Received: from iva3-dd2bb2ff2b5f.qloud-c.yandex.net (iva3-dd2bb2ff2b5f.qloud-c.yandex.net [2a02:6b8:c0c:7611:0:640:dd2b:b2ff]) by iva5-8cd627e71aff.qloud-c.yandex.net (mxback/Yandex) with ESMTP id n2YoYu3lPQ-hVIqT8FO; Sun, 29 Aug 2021 15:43:31 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1630241011; bh=tHiS1OqfoPTjalRnUjXdhwduoMGCi9V4ooL5RJaIQTo=; h=In-Reply-To:References:Date:To:From:Subject:Message-ID:Cc; b=XkkfoMMN3HfkC1xNsmUnO3uXGoUy8RoCw7/YUTGjfkW0dtKUpjnZ7K+vDUo/zk1EO wpRzR+POf/bq8gb9Z0zk94xHewBYAnfbU6pizqEy1aPHKOgWUjcqz2CD1hCtakG6Ga AXmA6Mi9BtH/xVkEprbH/I6Sh1fMGZ4r5w9Dzdy4= Authentication-Results: iva5-8cd627e71aff.qloud-c.yandex.net; dkim=pass header.i=@yandex.ru Original-Received: by iva3-dd2bb2ff2b5f.qloud-c.yandex.net (smtp/Yandex) with ESMTPSA id I99FYsdN40-hUf8hr42; Sun, 29 Aug 2021 15:43:30 +0300 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (Client certificate not present) In-Reply-To: <83h7f8n5hx.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:212929 Archived-At: On Sun, 2021-08-29 at 09:12 +0300, Eli Zaretskii wrote: > > From: Konstantin Kharlamov > > Cc: 50241@debbugs.gnu.org > > Date: Sat, 28 Aug 2021 23:42:08 +0300 > > > > Okay, I finally found the working combination, it is: > > > >     (progn > >       (require 'ispell) > >       (setq ispell-program-name "hunspell") > >       (ispell-set-spellchecker-params) > >       (ispell-hunspell-add-multi-dic "ru_RU,en_US") > >       (ispell-change-dictionary "ru_RU,en_US") > >       (flyspell-mode 1) > >       ) > > > > So, the magical function is `(ispell-set-spellchecker-params)`. Judging by > > its description, it has to be called before any ispell usage. > > > > I can probably call it manually, but I presume the behaviour needs fixing. > > I'm not sure I agree.  These are commands that are supposed to be > invoked interactively, in the order I've shown, which works.  If you > want to make this part of your initialization, you need to figure out > the required sequence of calls, which you did. Would you agree if I say that a good user interface means that a function invoked interactively should behave same way when it's invoked non-interactively (barring the fact that it won't show the prompt)? I would say that the answer is yes, otherwise it is very confusing. So I would say, at least the (ispell-set-spellchecker-params) needs to be added into one of them, so the same order as if they were called interactively would work when they are invoked from a Emacs Lisp file.