From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Martin Kletzander Newsgroups: gmane.emacs.bugs Subject: bug#25830: 25.2; ispell doesn't parse hunspell dictionaries properly Date: Tue, 28 Feb 2017 22:53:52 +0100 Message-ID: <20170228215352.GB29225@wheatley> References: <20170221091857.GA4096@wheatley> <83k28jo3ur.fsf@gnu.org> <20170221202454.GA30086@wheatley> <83fuj7tgto.fsf@gnu.org> <20170222104025.GA3557@wheatley> <83d1eatcxo.fsf@gnu.org> <20170222164310.GA3470@wheatley> <83efymsmnt.fsf@gnu.org> <20170225121523.GA9164@wheatley> <83poi3pr23.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed X-Trace: blaine.gmane.org 1488318918 1502 195.159.176.226 (28 Feb 2017 21:55:18 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 28 Feb 2017 21:55:18 +0000 (UTC) User-Agent: Mutt/1.5.24 (2015-08-30) Cc: 25830@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Feb 28 22:55:13 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cipjh-0007z6-0Z for geb-bug-gnu-emacs@m.gmane.org; Tue, 28 Feb 2017 22:55:09 +0100 Original-Received: from localhost ([::1]:37199 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cipjn-0003PA-6I for geb-bug-gnu-emacs@m.gmane.org; Tue, 28 Feb 2017 16:55:15 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50076) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cipjg-0003MU-LS for bug-gnu-emacs@gnu.org; Tue, 28 Feb 2017 16:55:09 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cipjb-0004Tp-68 for bug-gnu-emacs@gnu.org; Tue, 28 Feb 2017 16:55:08 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:34213) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cipjb-0004TD-36 for bug-gnu-emacs@gnu.org; Tue, 28 Feb 2017 16:55:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cipja-000135-Ik for bug-gnu-emacs@gnu.org; Tue, 28 Feb 2017 16:55:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Martin Kletzander Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 28 Feb 2017 21:55:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 25830 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 25830-submit@debbugs.gnu.org id=B25830.14883188423877 (code B ref 25830); Tue, 28 Feb 2017 21:55:02 +0000 Original-Received: (at 25830) by debbugs.gnu.org; 28 Feb 2017 21:54:02 +0000 Original-Received: from localhost ([127.0.0.1]:60645 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cipic-00010E-4z for submit@debbugs.gnu.org; Tue, 28 Feb 2017 16:54:02 -0500 Original-Received: from mail-wr0-f182.google.com ([209.85.128.182]:34037) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cipia-0000zq-KZ for 25830@debbugs.gnu.org; Tue, 28 Feb 2017 16:54:01 -0500 Original-Received: by mail-wr0-f182.google.com with SMTP id l37so17794724wrc.1 for <25830@debbugs.gnu.org>; Tue, 28 Feb 2017 13:54:00 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=7M4ft4ZJnx3+BMx5WxB7qw2zANzCeVE3jCEclvCx13Q=; b=EGyV7ejHVs8Q0sohUHyamoWWwy8UmwcbNi7ySEy+Zq0gSw9ksDo8Ij+/RhnprFAG6j 6ZoG4/F3hmjrnjBWtUHY+jko7GP9zFSNM1vn1TeT7DG0NuGmteR8qWsBoXJejU9tkFwK owIXk70C44jIDes74EAa5u2fZuZiUiw1SA1px6cJ1rf9tJYQ/2A5zSOOLk8/D5ZvxTLa byGWrkHy6EYA/fBFPrqcd01XAtCT9Y2OhdO2KRLrTReJA/oMkKnEw9DUmuMTtsJ/y6XR M4gIE1Nsta3oD6lurOlwzfSfQraXzf/mViXyIXqWBYniPtBbNvvJkhTpFZKo+xbhnc9A GGNw== X-Gm-Message-State: AMke39mbNJ6ViF+zKEQ8oEOBktZJZ03hn3fonP3PEKH7PQqpoaRbK8DocvhSibC4zPGSVA== X-Received: by 10.223.172.101 with SMTP id v92mr4604180wrc.49.1488318834856; Tue, 28 Feb 2017 13:53:54 -0800 (PST) Original-Received: from wheatley.localdomain (cock.kentus.net. [95.82.177.71]) by smtp.gmail.com with ESMTPSA id s103sm3945057wrc.6.2017.02.28.13.53.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 28 Feb 2017 13:53:53 -0800 (PST) Original-Received: by wheatley.localdomain (Postfix, from userid 1000) id A6FFD7E0049; Tue, 28 Feb 2017 22:53:52 +0100 (CET) Content-Disposition: inline In-Reply-To: <83poi3pr23.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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" Xref: news.gmane.org gmane.emacs.bugs:129962 Archived-At: On Mon, Feb 27, 2017 at 05:54:44PM +0200, Eli Zaretskii wrote: >> Date: Sat, 25 Feb 2017 13:15:23 +0100 >> From: Martin Kletzander >> Cc: 25830@debbugs.gnu.org >> >> >Thanks. I'll look into invoking ispell-hunspell-add-multi-dic >> >automatically when we find more than one dictionary loaded by >> >Hunspell, as it reports when invoked with the -D option. >> >> Thank you. Feel free too Cc me on any patch for that, I'll gladly test >> it out (and learn more about the underlying code). > >Please try the patch below. (If it doesn't apply to your version of >ispell.el, tell me which version of Emacs you have, and I will try to >produce a compatible patch.) > Sorry I didn't get to this earlier. One of the hunks didn't apply correctly, so I used the file from master and it applied correctly. So with your patch applied on top of ispell.el from current master, the situation is way better. But I feel like it still doesn't work as expected. Not that anything would be broken, but it uses only the first dictionary found. I have to manually do: (ispell-hunspell-add-multi-dic "en_GB,cs_CZ") (ispell-change-dictionary "en_GB,cs_CZ") I confirmed that both of them needed to be ran. However after that everything works perfectly. So the only reason why I said it doesn't work properly is that I see you running similar code in the patch: (when hunspell-multi-dict (ispell-hunspell-add-multi-dic hunspell-multi-dict) (setq ispell-current-dictionary hunspell-multi-dict)) When it works, I see hunspell is ran with '-d en_GB,cs_CZ', but it would also work if hunspell was ran without '-d', but my guess is that you don't want to do that. Anyway, to find out a bit more, I did some debugging. I'm not sure if it helps or if it makes it more confusing, though. Calling the function returns "en_GB,cs_CZ". When I add some prin1 statements around the 'add-multi-dic' and 'setq' I see it is called before the hunspell is ran and it has the proper values set. However when I check the values from the scratch buffer after it was ran (either manually or by spell-checking a word), it's like it didn't do anything. It behaves like it did all the right things, but in a different scope, even though the variables are not buffer-local or anything. Unsure how to continue or debug this more, I am giving up for today. Let me know if I should debug it a bit more somehow. Have a nice day, Martin