From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#20495: 24.5; invoking Hunspell with multiple dicts Date: Sat, 22 Aug 2015 17:29:19 +0300 Message-ID: <83egiviegw.fsf@gnu.org> References: <86r3qygjx6.fsf@gmx.de> <838ud5tqkx.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1440253832 32592 80.91.229.3 (22 Aug 2015 14:30:32 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 22 Aug 2015 14:30:32 +0000 (UTC) Cc: 20495-done@debbugs.gnu.org To: esbati@gmx.de Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Aug 22 16:30:17 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZT9oG-0007mn-C5 for geb-bug-gnu-emacs@m.gmane.org; Sat, 22 Aug 2015 16:30:16 +0200 Original-Received: from localhost ([::1]:46747 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZT9oF-0003Hd-Mu for geb-bug-gnu-emacs@m.gmane.org; Sat, 22 Aug 2015 10:30:15 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38075) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZT9oA-0003Go-Ox for bug-gnu-emacs@gnu.org; Sat, 22 Aug 2015 10:30:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZT9o5-0001zM-Tw for bug-gnu-emacs@gnu.org; Sat, 22 Aug 2015 10:30:10 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:43064) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZT9o5-0001yB-Qr for bug-gnu-emacs@gnu.org; Sat, 22 Aug 2015 10:30:05 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1ZT9o5-0006Fe-Fj for bug-gnu-emacs@gnu.org; Sat, 22 Aug 2015 10:30:05 -0400 Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Sat, 22 Aug 2015 14:30:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 20495 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Mail-Followup-To: 20495@debbugs.gnu.org, eliz@gnu.org, esbati@gmx.de Original-Received: via spool by 20495-done@debbugs.gnu.org id=D20495.144025376523956 (code D ref 20495); Sat, 22 Aug 2015 14:30:04 +0000 Original-Received: (at 20495-done) by debbugs.gnu.org; 22 Aug 2015 14:29:25 +0000 Original-Received: from localhost ([127.0.0.1]:35273 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZT9nR-0006EJ-4Y for submit@debbugs.gnu.org; Sat, 22 Aug 2015 10:29:25 -0400 Original-Received: from mtaout21.012.net.il ([80.179.55.169]:52846) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZT9nO-0006EA-PF for 20495-done@debbugs.gnu.org; Sat, 22 Aug 2015 10:29:23 -0400 Original-Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0NTH00100MVHNY00@a-mtaout21.012.net.il> for 20495-done@debbugs.gnu.org; Sat, 22 Aug 2015 17:29:20 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NTH001QPMWWMK30@a-mtaout21.012.net.il>; Sat, 22 Aug 2015 17:29:20 +0300 (IDT) In-reply-to: <838ud5tqkx.fsf@gnu.org> X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 208.118.235.43 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.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:105695 Archived-At: > Date: Sun, 03 May 2015 22:21:18 +0300 > From: Eli Zaretskii > Cc: 20495@debbugs.gnu.org > > > From: Arash Esbati > > Date: Sun, 03 May 2015 10:11:17 +0200 > > > > Eli kindly explained to me here > > that Hunspell does not > > support multiple languages, but it looks like a bug in `ispell.el'. > > Actually, I see that I was mistaken: the code does try to load each > dictionary in turn with its affix file. Nevertheless, I'm quite sure > such a combination misfired for me at some point; perhaps there's a > bug, or maybe ispell.el is the culprit, since it doesn't currently > support this mode (AFAIK). > > In any case, the reaction of ispell.el in this case needs to be > improved. I've now modified ispell.el to support invocation of Hunspell with multiple dictionaries. To see how it work, you will need to invoke an additional command ispell-hunspell-add-multi-dic, before you attempt to change the ispell dictionary to the form DICT1,DICT2,... This is because ispell.el relies heavily on the assumption that any dictionary admissible as argument to ispell-change-dictionary must be mentioned in ispell-dictionary-alist or ispell-local-dictionary-alist. Since it's impractical to add to ispell-dictionary-alist all the possible combinations of all the installed dictionaries, I instead provided a command to do that manually on the need-to basis. Note that the argument to both ispell-change-dictionary and ispell-hunspell-add-multi-dic _must_ be in the form of a list of _existing_ dictionary names (or their aliases) separated by a comma. That is, you cannot use something like "deutsch8+american", but should use "de_DE,en_US" instead. Initial testing indicates that using this feature works for spell-checking text written in different languages, although the list of the proposed corrections are sometimes incomplete. But I think this is due to some problems in Hunspell itself, not in Emacs. I'm closing this bug. Feel free to reopen if there are left-overs, or file a new bug about whatever problems you still see.