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: Sat, 28 Aug 2021 22:35:05 +0300 Message-ID: References: <581ffd00b0c4a0762689a423aff0ee13b5c85e52.camel@yandex.ru> <83lf4lmm8k.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="21981"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Evolution 3.40.4 Cc: 50241@debbugs.gnu.org To: undisclosed-recipients:; Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Aug 28 21:36:11 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 1mK47f-0005UL-23 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 28 Aug 2021 21:36:11 +0200 Original-Received: from localhost ([::1]:38370 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mK47c-0001MS-Rv for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 28 Aug 2021 15:36:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41586) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mK47W-0001MK-Qb for bug-gnu-emacs@gnu.org; Sat, 28 Aug 2021 15:36:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:43487) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mK47W-0000zd-J5 for bug-gnu-emacs@gnu.org; Sat, 28 Aug 2021 15:36:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mK47W-0006bg-3x for bug-gnu-emacs@gnu.org; Sat, 28 Aug 2021 15:36: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: Sat, 28 Aug 2021 19:36: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.163017931725340 (code B ref 50241); Sat, 28 Aug 2021 19:36:02 +0000 Original-Received: (at 50241) by debbugs.gnu.org; 28 Aug 2021 19:35:17 +0000 Original-Received: from localhost ([127.0.0.1]:55033 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mK46n-0006ad-M6 for submit@debbugs.gnu.org; Sat, 28 Aug 2021 15:35:17 -0400 Original-Received: from forward107j.mail.yandex.net ([5.45.198.252]:40496) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mK46k-0006aJ-QD for 50241@debbugs.gnu.org; Sat, 28 Aug 2021 15:35:16 -0400 Original-Received: from iva7-eacae0ae1191.qloud-c.yandex.net (iva7-eacae0ae1191.qloud-c.yandex.net [IPv6:2a02:6b8:c0c:322a:0:640:eaca:e0ae]) by forward107j.mail.yandex.net (Yandex) with ESMTP id 5F81B8844B3 for <50241@debbugs.gnu.org>; Sat, 28 Aug 2021 22:35:06 +0300 (MSK) Original-Received: from iva5-057a0d1fbbd8.qloud-c.yandex.net (iva5-057a0d1fbbd8.qloud-c.yandex.net [2a02:6b8:c0c:7f1c:0:640:57a:d1f]) by iva7-eacae0ae1191.qloud-c.yandex.net (mxback/Yandex) with ESMTP id uGYYkKr6W4-Z5HCB3Wa; Sat, 28 Aug 2021 22:35:06 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1630179306; bh=o7u9xk/Tin/v6R24QB7pcJsEwLrDlVr8zUUj1JcaBh8=; h=In-Reply-To:References:Date:From:Subject:Message-ID:Cc:To; b=ZlZTE7zaAeK9zTKkZA+naL4koHOT6amSpPiYjH4uSo/k6Tn4ahY6ND5jyKvO62c61 VWIfozRGvZN3UyL1uS6HvNeAdZkTEj8CfTJw2AK/7Qppx2bKD85CximOmtOugkibKy Itb8i8kqI+YaCsVCt9UjjLMbhRr+RE2REBWUPtY0= Authentication-Results: iva7-eacae0ae1191.qloud-c.yandex.net; dkim=pass header.i=@yandex.ru Original-Received: by iva5-057a0d1fbbd8.qloud-c.yandex.net (smtp/Yandex) with ESMTPSA id YkwIoW3Zl3-Z524PCwO; Sat, 28 Aug 2021 22:35:05 +0300 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (Client certificate not present) In-Reply-To: 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:212894 Archived-At: I found a wrokaround: executing the following code *twice* makes it work: (progn (require 'ispell) (setq ispell-program-name "hunspell") (ispell-hunspell-add-multi-dic "ru_RU,en_US") (setq ispell-local-dictionary '(("ru_RU,en_US" "[[:alpha:]]" "[^[:alpha:]]" "['0-9]" t ("-d" "ru_RU,en_US") nil utf-8))) (ispell-change-dictionary "ru_RU,en_US") (flyspell-mode 1) ) So, manually creating an entry in ispell-local-dictionary makes it work. However note I emphasized "twice" word — for some readon (I don't know why) even this workaround works if you execute this code twice. On the first evaluation it always generates an error. I tried changing the order of various expressions, but so far wasn't able to make it behave always same way (not sure it really matters though as it's just a a workaround).