From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 16 11:36:30 2013 Received: (at submit) by debbugs.gnu.org; 16 Jan 2013 16:36:30 +0000 Received: from localhost ([127.0.0.1]:35480 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TvVyX-0006Fg-RD for submit@debbugs.gnu.org; Wed, 16 Jan 2013 11:36:30 -0500 Received: from eggs.gnu.org ([208.118.235.92]:50914) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TvS46-00080u-SX for submit@debbugs.gnu.org; Wed, 16 Jan 2013 07:26:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TvS3W-0001jO-V1 for submit@debbugs.gnu.org; Wed, 16 Jan 2013 07:25:23 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-101.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, USER_IN_WHITELIST autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:60874) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TvS3W-0001jK-S6 for submit@debbugs.gnu.org; Wed, 16 Jan 2013 07:25:22 -0500 Received: from eggs.gnu.org ([208.118.235.92]:34026) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TvS3U-0007St-J4 for bug-gnu-emacs@gnu.org; Wed, 16 Jan 2013 07:25:22 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TvS3T-0001iZ-HK for bug-gnu-emacs@gnu.org; Wed, 16 Jan 2013 07:25:20 -0500 Received: from moutng.kundenserver.de ([212.227.126.187]:59662) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TvS3T-0001iN-8A for bug-gnu-emacs@gnu.org; Wed, 16 Jan 2013 07:25:19 -0500 Received: from omega.in.herr-schmitt.de (p3EE1E6D6.dip.t-dialin.net [62.225.230.214]) by mrelayeu.kundenserver.de (node=mreu4) with ESMTP (Nemesis) id 0MUPVW-1TUbnS30pW-00R5EG; Wed, 16 Jan 2013 13:25:17 +0100 Received: from omega.in.herr-schmitt.de (localhost [127.0.0.1]) by omega.in.herr-schmitt.de (8.14.5/8.14.5) with ESMTP id r0GCPB3M002219 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Wed, 16 Jan 2013 13:25:11 +0100 Received: (from s4504kr@localhost) by omega.in.herr-schmitt.de (8.14.5/8.14.5/Submit) id r0GCPA93002218 for bug-gnu-emacs@gnu.org; Wed, 16 Jan 2013 13:25:10 +0100 Date: Wed, 16 Jan 2013 13:25:10 +0100 From: Jochen Schmitt To: bug-gnu-emacs@gnu.org Subject: Issue to change dictionary when using hunspell on emacs Message-ID: <20130116122509.GA2209@omega.in.herr-schmitt.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-Provags-ID: V02:K0:572NWB0a7ZdYXTicgzaMy6asDdpcov+2LgW7MXUw1QV uLMiFOf/fRCWBn4gCpRsldW8FQEaCjTn/4S20Y/t1r7++3WIbI 12FKszyFxsp6R1U3SonA4h431u5glM/hKZ+P5ao44UwvxjZAGm bBKomkSGfRRCo/tAT7evpchcBFv+TcKUWvjarvI4FkV9ztcE3U JjLhzBKrvaVTrnbiGM0SWOrZPOmHt3fLb9Mrrhj7jGtsBDHOC3 jAj+754CKH8prOLcyCBvDl9h+NRcwqa4sjh3e+IESf8Fo3QBaS OARem8G048Cv9UN1tKs99HDY9qcPj1sblkIizpFNZZxxxOd7/L sQ9CA8R9mVDLasGst/s0WjZ6WHR6EQgkT5i4fbAnG6W2CrrcQu yz88KpP+ObYSQ== X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 208.118.235.17 X-Spam-Score: -4.2 (----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Wed, 16 Jan 2013 11:36:26 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.0 (-----) Hallo, I'm using emacs-24.1 on Fedora 17 (x86_64) and have the following isuue. When I want to write an text in enlish I have to change the used dictionary with M-x ispell-change-disctionary english. Unfortunately, I have to find out, that hunspell doesn't works properly after I have changed the dictionary to english. My examination show, that emacs will called hunspell in the way quoted abouve: [s4504kr@omega ~]$ hunspell -a -d english -B -i iso-8859-1 @(#) International Ispell Version 3.2.06 (but really Hunspell 1.3.2) Can't open affix or dictionary files for dictionary named "english". [s4504kr@omega ~]$ exit exit So It may be nice, if you have an solution for this issue. Best Regards: Jochen Schmitt From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 16 13:02:45 2013 Received: (at 13460) by debbugs.gnu.org; 16 Jan 2013 18:02:45 +0000 Received: from localhost ([127.0.0.1]:35558 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TvXK0-0000mR-BL for submit@debbugs.gnu.org; Wed, 16 Jan 2013 13:02:44 -0500 Received: from mtaout20.012.net.il ([80.179.55.166]:62037) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TvXJy-0000mD-A3 for 13460@debbugs.gnu.org; Wed, 16 Jan 2013 13:02:43 -0500 Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0MGQ00K00CIAI600@a-mtaout20.012.net.il> for 13460@debbugs.gnu.org; Wed, 16 Jan 2013 20:01:51 +0200 (IST) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MGQ00KPHCR32M90@a-mtaout20.012.net.il>; Wed, 16 Jan 2013 20:01:51 +0200 (IST) Date: Wed, 16 Jan 2013 20:01:53 +0200 From: Eli Zaretskii Subject: Re: bug#13460: Issue to change dictionary when using hunspell on emacs In-reply-to: <20130116122509.GA2209@omega.in.herr-schmitt.de> X-012-Sender: halo1@inter.net.il To: Jochen Schmitt Message-id: <83hamh80ry.fsf@gnu.org> References: <20130116122509.GA2209@omega.in.herr-schmitt.de> X-Spam-Score: 1.5 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: > Date: Wed, 16 Jan 2013 13:25:10 +0100 > From: Jochen Schmitt > > I'm using emacs-24.1 on Fedora 17 (x86_64) and have the following > isuue. When I want to write an text in enlish I have to change > the used dictionary with M-x ispell-change-disctionary english. > > Unfortunately, I have to find out, that hunspell doesn't works > properly after I have changed the dictionary to english. > > My examination show, that emacs will called hunspell in the way > quoted abouve: > > [s4504kr@omega ~]$ hunspell -a -d english -B -i iso-8859-1 > @(#) International Ispell Version 3.2.06 (but really Hunspell 1.3.2) > Can't open affix or dictionary files for dictionary named "english". > [s4504kr@omega ~]$ exit > exit > > So It may be nice, if you have an solution for this issue. [...] Content analysis details: (1.5 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [80.179.55.166 listed in list.dnswl.org] 0.7 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.8 BAYES_50 BODY: Bayes spam probability is 40 to 60% [score: 0.4997] X-Debbugs-Envelope-To: 13460 Cc: 13460@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: 1.5 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: > Date: Wed, 16 Jan 2013 13:25:10 +0100 > From: Jochen Schmitt > > I'm using emacs-24.1 on Fedora 17 (x86_64) and have the following > isuue. When I want to write an text in enlish I have to change > the used dictionary with M-x ispell-change-disctionary english. > > Unfortunately, I have to find out, that hunspell doesn't works > properly after I have changed the dictionary to english. > > My examination show, that emacs will called hunspell in the way > quoted abouve: > > [s4504kr@omega ~]$ hunspell -a -d english -B -i iso-8859-1 > @(#) International Ispell Version 3.2.06 (but really Hunspell 1.3.2) > Can't open affix or dictionary files for dictionary named "english". > [s4504kr@omega ~]$ exit > exit > > So It may be nice, if you have an solution for this issue. [...] Content analysis details: (1.5 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [80.179.55.166 listed in list.dnswl.org] 0.7 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.8 BAYES_50 BODY: Bayes spam probability is 40 to 60% [score: 0.4282] > Date: Wed, 16 Jan 2013 13:25:10 +0100 > From: Jochen Schmitt > > I'm using emacs-24.1 on Fedora 17 (x86_64) and have the following > isuue. When I want to write an text in enlish I have to change > the used dictionary with M-x ispell-change-disctionary english. > > Unfortunately, I have to find out, that hunspell doesn't works > properly after I have changed the dictionary to english. > > My examination show, that emacs will called hunspell in the way > quoted abouve: > > [s4504kr@omega ~]$ hunspell -a -d english -B -i iso-8859-1 > @(#) International Ispell Version 3.2.06 (but really Hunspell 1.3.2) > Can't open affix or dictionary files for dictionary named "english". > [s4504kr@omega ~]$ exit > exit > > So It may be nice, if you have an solution for this issue. You need to install the English dictionary for Hunspell. I suspect that its name will be en_US (or maybe en_GB), not "english". From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 16 18:24:05 2013 Received: (at 13460) by debbugs.gnu.org; 16 Jan 2013 23:24:05 +0000 Received: from localhost ([127.0.0.1]:35791 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TvcKz-0002x3-6C for submit@debbugs.gnu.org; Wed, 16 Jan 2013 18:24:05 -0500 Received: from fencepost.gnu.org ([208.118.235.10]:37258) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TvcKx-0002wv-07 for 13460@debbugs.gnu.org; Wed, 16 Jan 2013 18:24:03 -0500 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1TvcKK-0005A7-2z; Wed, 16 Jan 2013 18:23:24 -0500 From: Glenn Morris To: Eli Zaretskii Subject: Re: bug#13460: Issue to change dictionary when using hunspell on emacs References: <20130116122509.GA2209@omega.in.herr-schmitt.de> <83hamh80ry.fsf@gnu.org> X-Spook: SP4 Dick Cheney NASA emc AVIP NWO kilo class Commecen X-Ran: eG;rZ=],3aR~/^h"fYV{#[Fv~lL_'l{>7dC}y'BxVrS^qI:Q^?wGv3KZq%"~0a1zJpV5fg X-Hue: white X-Attribution: GM Date: Wed, 16 Jan 2013 18:23:23 -0500 In-Reply-To: <83hamh80ry.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 16 Jan 2013 20:01:53 +0200") Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -4.2 (----) X-Debbugs-Envelope-To: 13460 Cc: 13460@debbugs.gnu.org, Jochen Schmitt X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.5 (-----) Eli Zaretskii wrote: > You need to install the English dictionary for Hunspell. I suspect > that its name will be en_US (or maybe en_GB), not "english". M-x ispell-change-dictionary doesn't accept "en_US" as input. It wants something like "english" (coming from ispell-dictionary-base-alist), which as you say is wrong. Tested with: hunspell -D [...] LOADED DICTIONARY: /usr/share/myspell/en_US.aff /usr/share/myspell/en_US.dic Hunspell 1.2.8 emacs -Q --eval '(setq ispell-program-name "/usr/bin/hunspell") From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 16 22:51:59 2013 Received: (at 13460) by debbugs.gnu.org; 17 Jan 2013 03:51:59 +0000 Received: from localhost ([127.0.0.1]:35920 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TvgWE-0001yG-VU for submit@debbugs.gnu.org; Wed, 16 Jan 2013 22:51:59 -0500 Received: from mtaout22.012.net.il ([80.179.55.172]:43608) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TvgW9-0001y4-Ar for 13460@debbugs.gnu.org; Wed, 16 Jan 2013 22:51:55 -0500 Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0MGR0040040NKD00@a-mtaout22.012.net.il> for 13460@debbugs.gnu.org; Thu, 17 Jan 2013 05:51:12 +0200 (IST) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MGR004NX41AF140@a-mtaout22.012.net.il>; Thu, 17 Jan 2013 05:51:12 +0200 (IST) Date: Thu, 17 Jan 2013 05:51:13 +0200 From: Eli Zaretskii Subject: Re: bug#13460: Issue to change dictionary when using hunspell on emacs In-reply-to: X-012-Sender: halo1@inter.net.il To: Glenn Morris Message-id: <838v7s8o26.fsf@gnu.org> References: <20130116122509.GA2209@omega.in.herr-schmitt.de> <83hamh80ry.fsf@gnu.org> X-Spam-Score: 1.5 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: > From: Glenn Morris > Cc: Jochen Schmitt , 13460@debbugs.gnu.org > Date: Wed, 16 Jan 2013 18:23:23 -0500 > > Eli Zaretskii wrote: > > > You need to install the English dictionary for Hunspell. I suspect > > that its name will be en_US (or maybe en_GB), not "english". > > M-x ispell-change-dictionary doesn't accept "en_US" as input. > It wants something like "english" (coming from > ispell-dictionary-base-alist), which as you say is wrong. [...] Content analysis details: (1.5 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [80.179.55.172 listed in list.dnswl.org] 0.7 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.8 BAYES_50 BODY: Bayes spam probability is 40 to 60% [score: 0.4314] X-Debbugs-Envelope-To: 13460 Cc: 13460@debbugs.gnu.org, Jochen@herr-schmitt.de X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: 0.2 (/) > From: Glenn Morris > Cc: Jochen Schmitt , 13460@debbugs.gnu.org > Date: Wed, 16 Jan 2013 18:23:23 -0500 > > Eli Zaretskii wrote: > > > You need to install the English dictionary for Hunspell. I suspect > > that its name will be en_US (or maybe en_GB), not "english". > > M-x ispell-change-dictionary doesn't accept "en_US" as input. > It wants something like "english" (coming from > ispell-dictionary-base-alist), which as you say is wrong. Then one needs to customize ispell-local-dictionary-alist to include the setting for en_US. Here's what I have there: '("en_US" "[[:alpha:]]" "[^[:alpha:]]" "[']" nil ("-r") nil utf-8) The OP may wish to omit the -r switch, it's not a necessity. Also, be sure to look at en_US.aff and match the character set it mentions there with the "utf-8" part above. From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 17 01:38:15 2013 Received: (at 13460) by debbugs.gnu.org; 17 Jan 2013 06:38:16 +0000 Received: from localhost ([127.0.0.1]:35994 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Tvj76-00074q-Ub for submit@debbugs.gnu.org; Thu, 17 Jan 2013 01:38:14 -0500 Received: from fencepost.gnu.org ([208.118.235.10]:46949) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Tvj74-00074j-DE for 13460@debbugs.gnu.org; Thu, 17 Jan 2013 01:38:11 -0500 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1Tvj6Q-0000gA-9g; Thu, 17 Jan 2013 01:37:30 -0500 From: Glenn Morris To: Eli Zaretskii Subject: Re: bug#13460: Issue to change dictionary when using hunspell on emacs References: <20130116122509.GA2209@omega.in.herr-schmitt.de> <83hamh80ry.fsf@gnu.org> <838v7s8o26.fsf@gnu.org> X-Spook: EuroFed tempest interception red noise kibo CID wire X-Ran: |!hG4L(W^)29+![1G*[]?7__834;&K::lpt9X[>X#!8UU|]P[sne\`[P%tkXL2mT#yV:!- X-Hue: white X-Debbugs-No-Ack: yes X-Attribution: GM Date: Thu, 17 Jan 2013 01:37:30 -0500 In-Reply-To: <838v7s8o26.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 17 Jan 2013 05:51:13 +0200") Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -4.2 (----) X-Debbugs-Envelope-To: 13460 Cc: 13460@debbugs.gnu.org, Jochen@herr-schmitt.de X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.5 (-----) Eli Zaretskii wrote: >> From: Glenn Morris >> Cc: Jochen Schmitt , 13460@debbugs.gnu.org >> Date: Wed, 16 Jan 2013 18:23:23 -0500 >> >> Eli Zaretskii wrote: >> >> > You need to install the English dictionary for Hunspell. I suspect >> > that its name will be en_US (or maybe en_GB), not "english". >> >> M-x ispell-change-dictionary doesn't accept "en_US" as input. >> It wants something like "english" (coming from >> ispell-dictionary-base-alist), which as you say is wrong. > > Then one needs to customize ispell-local-dictionary-alist to include > the setting for en_US. Here's what I have there: > > '("en_US" > "[[:alpha:]]" > "[^[:alpha:]]" > "[']" nil ("-r") nil utf-8) > > The OP may wish to omit the -r switch, it's not a necessity. > > Also, be sure to look at en_US.aff and match the character set it > mentions there with the "utf-8" part above. IMO it should work out of the box. Ie ispell-set-spellchecker-params should handle hunspell as it currently does aspell, which has its own ispell-find-aspell-dictionaries func. From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 17 07:27:37 2013 Received: (at submit) by debbugs.gnu.org; 17 Jan 2013 12:27:37 +0000 Received: from localhost ([127.0.0.1]:36314 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TvoZE-0007Eg-NZ for submit@debbugs.gnu.org; Thu, 17 Jan 2013 07:27:37 -0500 Received: from eggs.gnu.org ([208.118.235.92]:52803) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TvoZA-0007EX-OU for submit@debbugs.gnu.org; Thu, 17 Jan 2013 07:27:35 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TvoYS-0001jL-9A for submit@debbugs.gnu.org; Thu, 17 Jan 2013 07:26:51 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-104.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD,USER_IN_WHITELIST autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:60203) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TvoYS-0001jG-67 for submit@debbugs.gnu.org; Thu, 17 Jan 2013 07:26:48 -0500 Received: from eggs.gnu.org ([208.118.235.92]:35913) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TvoYO-0003mq-FC for bug-gnu-emacs@gnu.org; Thu, 17 Jan 2013 07:26:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TvoYK-0001hB-Kn for bug-gnu-emacs@gnu.org; Thu, 17 Jan 2013 07:26:44 -0500 Received: from edison.ccupm.upm.es ([138.100.198.71]:58334 helo=smtp.upm.es) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TvoYK-0001fZ-Ar for bug-gnu-emacs@gnu.org; Thu, 17 Jan 2013 07:26:40 -0500 Received: from agmartin.aq.upm.es (Agmartin.aq.upm.es [138.100.41.131]) by smtp.upm.es (8.14.3/8.14.3/edison-001) with ESMTP id r0HCQWfh029484; Thu, 17 Jan 2013 13:26:32 +0100 Received: by agmartin.aq.upm.es (Postfix, from userid 1000) id DA65F449; Thu, 17 Jan 2013 13:26:31 +0100 (CET) Date: Thu, 17 Jan 2013 13:26:31 +0100 From: Agustin Martin To: bug-gnu-emacs@gnu.org Subject: Re: bug#13460: Issue to change dictionary when using hunspell on emacs Message-ID: <20130117122631.GA5097@agmartin.aq.upm.es> References: <20130116122509.GA2209@omega.in.herr-schmitt.de> <83hamh80ry.fsf@gnu.org> <838v7s8o26.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 208.118.235.17 X-Spam-Score: -4.2 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.0 (-----) On Thu, Jan 17, 2013 at 01:37:30AM -0500, Glenn Morris wrote: > Eli Zaretskii wrote: > > >> From: Glenn Morris > >> Cc: Jochen Schmitt , 13460@debbugs.gnu.org > >> Date: Wed, 16 Jan 2013 18:23:23 -0500 > >> > >> Eli Zaretskii wrote: > >> > >> > You need to install the English dictionary for Hunspell. I suspect > >> > that its name will be en_US (or maybe en_GB), not "english". > >> > >> M-x ispell-change-dictionary doesn't accept "en_US" as input. > >> It wants something like "english" (coming from > >> ispell-dictionary-base-alist), which as you say is wrong. > > > > Then one needs to customize ispell-local-dictionary-alist to include > > the setting for en_US. Here's what I have there: > > > > '("en_US" > > "[[:alpha:]]" > > "[^[:alpha:]]" > > "[']" nil ("-r") nil utf-8) > > > > The OP may wish to omit the -r switch, it's not a necessity. > > > > Also, be sure to look at en_US.aff and match the character set it > > mentions there with the "utf-8" part above. > > IMO it should work out of the box. > Ie ispell-set-spellchecker-params should handle hunspell as it currently > does aspell, which has its own ispell-find-aspell-dictionaries func. The problem is that hunspell -D does not return control. A bug has been opened for this, together with patch suggested by Eli Zaretskii, http://sourceforge.net/tracker/?func=detail&aid=3522524&group_id=143754&atid=756395 A workaround was proposed (redirecting from /dev/null), but it seems too UNIX biassed. There is also an associated problem when hunspell does not find the requested dictionary under Emacs, because it does not triger an explicit error. This leaves Emacs waiting for a reply in an infinite loop, http://bugs.debian.org/690318 The reason is that when in pipe mode hunspell sends init string in a non ispell/aspell compliant way. Reported and patch proposed as http://sourceforge.net/tracker/?func=detail&aid=3577183&group_id=143754&atid=756395 -- Agustin From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 17 10:25:13 2013 Received: (at submit) by debbugs.gnu.org; 17 Jan 2013 15:25:13 +0000 Received: from localhost ([127.0.0.1]:37118 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TvrL7-0003m0-73 for submit@debbugs.gnu.org; Thu, 17 Jan 2013 10:25:13 -0500 Received: from eggs.gnu.org ([208.118.235.92]:43814) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TvrL5-0003lt-4S for submit@debbugs.gnu.org; Thu, 17 Jan 2013 10:25:12 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TvrKO-0006nn-Dy for submit@debbugs.gnu.org; Thu, 17 Jan 2013 10:24:29 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-104.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD,USER_IN_WHITELIST autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:43131) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TvrKO-0006nj-Ab for submit@debbugs.gnu.org; Thu, 17 Jan 2013 10:24:28 -0500 Received: from eggs.gnu.org ([208.118.235.92]:55171) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TvrKM-00086j-Ri for bug-gnu-emacs@gnu.org; Thu, 17 Jan 2013 10:24:28 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TvrKH-0006nF-Q6 for bug-gnu-emacs@gnu.org; Thu, 17 Jan 2013 10:24:26 -0500 Received: from fibonacci.ccupm.upm.es ([138.100.198.70]:53328 helo=smtp.upm.es) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TvrKH-0006n0-GM for bug-gnu-emacs@gnu.org; Thu, 17 Jan 2013 10:24:21 -0500 Received: from agmartin.aq.upm.es (Agmartin.aq.upm.es [138.100.41.131]) by smtp.upm.es (8.14.3/8.14.3/fibonacci-001) with ESMTP id r0HFOGB0005631; Thu, 17 Jan 2013 16:24:16 +0100 Received: by agmartin.aq.upm.es (Postfix, from userid 1000) id 418191FE9C; Thu, 17 Jan 2013 16:24:16 +0100 (CET) Date: Thu, 17 Jan 2013 16:24:16 +0100 From: Agustin Martin To: bug-gnu-emacs@gnu.org Subject: Re: bug#13460: Issue to change dictionary when using hunspell on emacs Message-ID: <20130117152416.GA32329@agmartin.aq.upm.es> References: <20130116122509.GA2209@omega.in.herr-schmitt.de> <83hamh80ry.fsf@gnu.org> <838v7s8o26.fsf@gnu.org> <20130117122631.GA5097@agmartin.aq.upm.es> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20130117122631.GA5097@agmartin.aq.upm.es> User-Agent: Mutt/1.5.21 (2010-09-15) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 208.118.235.17 X-Spam-Score: -4.2 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) On Thu, Jan 17, 2013 at 01:26:31PM +0100, Agustin Martin wrote: > On Thu, Jan 17, 2013 at 01:37:30AM -0500, Glenn Morris wrote: > > Eli Zaretskii wrote: > > > > >> From: Glenn Morris > > >> Cc: Jochen Schmitt , 13460@debbugs.gnu.org > > >> Date: Wed, 16 Jan 2013 18:23:23 -0500 > > >> > > >> Eli Zaretskii wrote: > > >> > > >> > You need to install the English dictionary for Hunspell. I suspect > > >> > that its name will be en_US (or maybe en_GB), not "english". > > >> > > >> M-x ispell-change-dictionary doesn't accept "en_US" as input. > > >> It wants something like "english" (coming from > > >> ispell-dictionary-base-alist), which as you say is wrong. > > > > > > Then one needs to customize ispell-local-dictionary-alist to include > > > the setting for en_US. Here's what I have there: > > > > > > '("en_US" > > > "[[:alpha:]]" > > > "[^[:alpha:]]" > > > "[']" nil ("-r") nil utf-8) > > > > > > The OP may wish to omit the -r switch, it's not a necessity. > > > > > > Also, be sure to look at en_US.aff and match the character set it > > > mentions there with the "utf-8" part above. > > > > IMO it should work out of the box. > > Ie ispell-set-spellchecker-params should handle hunspell as it currently > > does aspell, which has its own ispell-find-aspell-dictionaries func. > > The problem is that hunspell -D does not return control. A bug has been > opened for this, together with patch suggested by Eli Zaretskii, > > http://sourceforge.net/tracker/?func=detail&aid=3522524&group_id=143754&atid=756395 > > A workaround was proposed (redirecting from /dev/null), but it seems too > UNIX biassed. There is a second issue I forgot, one needs to get info from the installed .aff files, so all them must be completely opened to look for that info (OTHERCHARS and friends) and I'd expect that to slow Emacs init a bit. Since I did not try to write preliminary code for that parsing I cannot evaluate that delay. Fortunately aspell used small .dat files for that purpose. -- Agustin From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 17 11:11:37 2013 Received: (at 13460) by debbugs.gnu.org; 17 Jan 2013 16:11:37 +0000 Received: from localhost ([127.0.0.1]:37150 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Tvs41-0004sn-5X for submit@debbugs.gnu.org; Thu, 17 Jan 2013 11:11:37 -0500 Received: from mtaout20.012.net.il ([80.179.55.166]:51102) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Tvs3x-0004sY-TO for 13460@debbugs.gnu.org; Thu, 17 Jan 2013 11:11:35 -0500 Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0MGS00C0024CLW00@a-mtaout20.012.net.il> for 13460@debbugs.gnu.org; Thu, 17 Jan 2013 18:10:24 +0200 (IST) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MGS00BA829BC1Q0@a-mtaout20.012.net.il>; Thu, 17 Jan 2013 18:10:24 +0200 (IST) Date: Thu, 17 Jan 2013 18:10:29 +0200 From: Eli Zaretskii Subject: Re: bug#13460: Issue to change dictionary when using hunspell on emacs In-reply-to: <20130117122631.GA5097@agmartin.aq.upm.es> X-012-Sender: halo1@inter.net.il To: Agustin Martin Message-id: <837gnb94ei.fsf@gnu.org> References: <20130116122509.GA2209@omega.in.herr-schmitt.de> <83hamh80ry.fsf@gnu.org> <838v7s8o26.fsf@gnu.org> <20130117122631.GA5097@agmartin.aq.upm.es> X-Spam-Score: 1.5 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: > Date: Thu, 17 Jan 2013 13:26:31 +0100 > From: Agustin Martin > > > Ie ispell-set-spellchecker-params should handle hunspell as it currently > > does aspell, which has its own ispell-find-aspell-dictionaries func. > > The problem is that hunspell -D does not return control. [...] Content analysis details: (1.5 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [80.179.55.166 listed in list.dnswl.org] 0.7 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.8 BAYES_50 BODY: Bayes spam probability is 40 to 60% [score: 0.5000] X-Debbugs-Envelope-To: 13460 Cc: 13460@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: 1.5 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: > Date: Thu, 17 Jan 2013 13:26:31 +0100 > From: Agustin Martin > > > Ie ispell-set-spellchecker-params should handle hunspell as it currently > > does aspell, which has its own ispell-find-aspell-dictionaries func. > > The problem is that hunspell -D does not return control. [...] Content analysis details: (1.5 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [80.179.55.166 listed in list.dnswl.org] 0.7 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.8 BAYES_50 BODY: Bayes spam probability is 40 to 60% [score: 0.4891] > Date: Thu, 17 Jan 2013 13:26:31 +0100 > From: Agustin Martin > > > Ie ispell-set-spellchecker-params should handle hunspell as it currently > > does aspell, which has its own ispell-find-aspell-dictionaries func. > > The problem is that hunspell -D does not return control. Right. But perhaps ispell.el could kill hunspell once it has read the list of dictionaries. > A workaround was proposed (redirecting from /dev/null), but it seems too > UNIX biassed. We could use 'null-device', which is portable. > There is also an associated problem when hunspell does not find the requested > dictionary under Emacs, because it does not triger an explicit error. Right, but we should always find the dictionary ;-) From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 17 11:31:46 2013 Received: (at 13460) by debbugs.gnu.org; 17 Jan 2013 16:31:46 +0000 Received: from localhost ([127.0.0.1]:37181 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TvsNV-0005MV-MD for submit@debbugs.gnu.org; Thu, 17 Jan 2013 11:31:46 -0500 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:30798) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TvsNT-0005MN-Lc for 13460@debbugs.gnu.org; Thu, 17 Jan 2013 11:31:44 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AtkGAG6Zu09FpZpV/2dsb2JhbABEgXuyFoEIghUBAQQBViMFCws0EhQYDSSIHAW6CZBEA4hCmnGBWIMH X-IronPort-AV: E=Sophos;i="4.75,637,1330923600"; d="scan'208";a="212790858" Received: from 69-165-154-85.dsl.teksavvy.com (HELO pastel.home) ([69.165.154.85]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 17 Jan 2013 11:31:01 -0500 Received: by pastel.home (Postfix, from userid 20848) id BEA4D59537; Thu, 17 Jan 2013 11:31:00 -0500 (EST) From: Stefan Monnier To: Agustin Martin Subject: Re: bug#13460: Issue to change dictionary when using hunspell on emacs Message-ID: References: <20130116122509.GA2209@omega.in.herr-schmitt.de> <83hamh80ry.fsf@gnu.org> <838v7s8o26.fsf@gnu.org> <20130117122631.GA5097@agmartin.aq.upm.es> <20130117152416.GA32329@agmartin.aq.upm.es> Date: Thu, 17 Jan 2013 11:31:00 -0500 In-Reply-To: <20130117152416.GA32329@agmartin.aq.upm.es> (Agustin Martin's message of "Thu, 17 Jan 2013 16:24:16 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.8 (/) X-Debbugs-Envelope-To: 13460 Cc: 13460@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -0.5 (/) > There is a second issue I forgot, one needs to get info from the installed > .aff files, so all them must be completely opened to look for that info > (OTHERCHARS and friends) and I'd expect that to slow Emacs init a bit. We don't have to do that just to get the list of languages: it can be delayed to the moment a particular language is selected. Stefan From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 17 11:42:07 2013 Received: (at 13460) by debbugs.gnu.org; 17 Jan 2013 16:42:08 +0000 Received: from localhost ([127.0.0.1]:37193 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TvsXX-0005b4-Iz for submit@debbugs.gnu.org; Thu, 17 Jan 2013 11:42:07 -0500 Received: from mtaout23.012.net.il ([80.179.55.175]:42313) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TvsXU-0005at-74 for 13460@debbugs.gnu.org; Thu, 17 Jan 2013 11:42:05 -0500 Received: from conversion-daemon.a-mtaout23.012.net.il by a-mtaout23.012.net.il (HyperSendmail v2007.08) id <0MGS00B003LWMC00@a-mtaout23.012.net.il> for 13460@debbugs.gnu.org; Thu, 17 Jan 2013 18:41:21 +0200 (IST) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout23.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MGS00B863ORHG50@a-mtaout23.012.net.il>; Thu, 17 Jan 2013 18:41:15 +0200 (IST) Date: Thu, 17 Jan 2013 18:41:20 +0200 From: Eli Zaretskii Subject: Re: bug#13460: Issue to change dictionary when using hunspell on emacs In-reply-to: <20130117152416.GA32329@agmartin.aq.upm.es> X-012-Sender: halo1@inter.net.il To: Agustin Martin Message-id: <83y5fr7oen.fsf@gnu.org> References: <20130116122509.GA2209@omega.in.herr-schmitt.de> <83hamh80ry.fsf@gnu.org> <838v7s8o26.fsf@gnu.org> <20130117122631.GA5097@agmartin.aq.upm.es> <20130117152416.GA32329@agmartin.aq.upm.es> X-Spam-Score: 1.5 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: > Date: Thu, 17 Jan 2013 16:24:16 +0100 > From: Agustin Martin > > There is a second issue I forgot, one needs to get info from the installed > .aff files, so all them must be completely opened to look for that info > (OTHERCHARS and friends) and I'd expect that to slow Emacs init a bit. [...] Content analysis details: (1.5 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [80.179.55.175 listed in list.dnswl.org] 0.7 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.8 BAYES_50 BODY: Bayes spam probability is 40 to 60% [score: 0.5000] X-Debbugs-Envelope-To: 13460 Cc: 13460@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: 1.5 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: > Date: Thu, 17 Jan 2013 16:24:16 +0100 > From: Agustin Martin > > There is a second issue I forgot, one needs to get info from the installed > .aff files, so all them must be completely opened to look for that info > (OTHERCHARS and friends) and I'd expect that to slow Emacs init a bit. [...] Content analysis details: (1.5 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [80.179.55.175 listed in list.dnswl.org] 0.7 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.8 BAYES_50 BODY: Bayes spam probability is 40 to 60% [score: 0.4742] > Date: Thu, 17 Jan 2013 16:24:16 +0100 > From: Agustin Martin > > There is a second issue I forgot, one needs to get info from the installed > .aff files, so all them must be completely opened to look for that info > (OTHERCHARS and friends) and I'd expect that to slow Emacs init a bit. You don't need OTHERCHARS, only the SET, to figure out the encoding in which to talk to hunspell for each dictionary. (OTHERCHARS cannot be gleaned from the hunspell .aff files anyway, AFAIU.) The other problem is with CASECHARS, but that is unavailable with aspell as well, we are just guessing there. We could guess the same for hunspell. From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 17 13:09:18 2013 Received: (at 13460) by debbugs.gnu.org; 17 Jan 2013 18:09:18 +0000 Received: from localhost ([127.0.0.1]:37257 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Tvttu-0007ck-6Y for submit@debbugs.gnu.org; Thu, 17 Jan 2013 13:09:18 -0500 Received: from fencepost.gnu.org ([208.118.235.10]:43961) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Tvttr-0007cb-HX for 13460@debbugs.gnu.org; Thu, 17 Jan 2013 13:09:16 -0500 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1Tvtt8-00071Z-PY; Thu, 17 Jan 2013 13:08:30 -0500 From: Glenn Morris To: Agustin Martin Subject: Re: bug#13460: Issue to change dictionary when using hunspell on emacs References: <20130116122509.GA2209@omega.in.herr-schmitt.de> <83hamh80ry.fsf@gnu.org> <838v7s8o26.fsf@gnu.org> <20130117122631.GA5097@agmartin.aq.upm.es> <20130117152416.GA32329@agmartin.aq.upm.es> X-Spook: Bush Wired Sears Tower Project Monarch Maple TWA counter X-Ran: Y^nWv94NN#qz"mP1i!r>#G`Wf}7.'[v_\;9;/QV~bvw2"UZZufMJcM%XJ`TA`O-Q}2;)X8 X-Hue: red X-Debbugs-No-Ack: yes X-Attribution: GM Date: Thu, 17 Jan 2013 13:08:30 -0500 In-Reply-To: <20130117152416.GA32329@agmartin.aq.upm.es> (Agustin Martin's message of "Thu, 17 Jan 2013 16:24:16 +0100") Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -3.0 (---) X-Debbugs-Envelope-To: 13460 Cc: 13460@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.8 (---) Agustin Martin wrote: > The problem is that hunspell -D does not return control. [...] > A workaround was proposed (redirecting from /dev/null), but it seems too > UNIX biassed. "UNIX biased" -> "does not work on MS Windows" ? If the equivalent of "hunspell < null-device" works on MS Windows, that's one problem easily solved, no? From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 17 13:13:28 2013 Received: (at 13460) by debbugs.gnu.org; 17 Jan 2013 18:13:29 +0000 Received: from localhost ([127.0.0.1]:37261 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Tvtxs-0007iT-TY for submit@debbugs.gnu.org; Thu, 17 Jan 2013 13:13:28 -0500 Received: from fibonacci.ccupm.upm.es ([138.100.198.70]:43060 helo=smtp.upm.es) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Tvtxn-0007iH-5w for 13460@debbugs.gnu.org; Thu, 17 Jan 2013 13:13:23 -0500 Received: from agmartin.aq.upm.es (Agmartin.aq.upm.es [138.100.41.131]) by smtp.upm.es (8.14.3/8.14.3/fibonacci-001) with ESMTP id r0HICZN5024912; Thu, 17 Jan 2013 19:12:35 +0100 Received: by agmartin.aq.upm.es (Postfix, from userid 1000) id DC34D1FE9C; Thu, 17 Jan 2013 19:12:34 +0100 (CET) Date: Thu, 17 Jan 2013 19:12:34 +0100 From: Agustin Martin To: 13460@debbugs.gnu.org Subject: Re: bug#13460: Issue to change dictionary when using hunspell on emacs Message-ID: <20130117181234.GA24961@agmartin.aq.upm.es> References: <20130116122509.GA2209@omega.in.herr-schmitt.de> <83hamh80ry.fsf@gnu.org> <838v7s8o26.fsf@gnu.org> <20130117122631.GA5097@agmartin.aq.upm.es> <20130117152416.GA32329@agmartin.aq.upm.es> <83y5fr7oen.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <83y5fr7oen.fsf@gnu.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Score: -1.5 (-) X-Debbugs-Envelope-To: 13460 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.3 (--) On Thu, Jan 17, 2013 at 06:41:20PM +0200, Eli Zaretskii wrote: > > Date: Thu, 17 Jan 2013 16:24:16 +0100 > > From: Agustin Martin > > > > There is a second issue I forgot, one needs to get info from the installed > > .aff files, so all them must be completely opened to look for that info > > (OTHERCHARS and friends) and I'd expect that to slow Emacs init a bit. > > You don't need OTHERCHARS, only the SET, to figure out the encoding in > which to talk to hunspell for each dictionary. (OTHERCHARS cannot be > gleaned from the hunspell .aff files anyway, AFAIU.) Sorry, I should have written WORDCHARS. > The other problem is with CASECHARS, but that is unavailable with > aspell as well, we are just guessing there. We could guess the same > for hunspell. Agreed. -- Agustin From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 17 13:16:06 2013 Received: (at 13460) by debbugs.gnu.org; 17 Jan 2013 18:16:06 +0000 Received: from localhost ([127.0.0.1]:37265 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Tvu0U-0007mj-3N for submit@debbugs.gnu.org; Thu, 17 Jan 2013 13:16:06 -0500 Received: from fibonacci.ccupm.upm.es ([138.100.198.70]:51700 helo=smtp.upm.es) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Tvu0R-0007mb-Sy for 13460@debbugs.gnu.org; Thu, 17 Jan 2013 13:16:05 -0500 Received: from agmartin.aq.upm.es (Agmartin.aq.upm.es [138.100.41.131]) by smtp.upm.es (8.14.3/8.14.3/fibonacci-001) with ESMTP id r0HIFL8S025149; Thu, 17 Jan 2013 19:15:21 +0100 Received: by agmartin.aq.upm.es (Postfix, from userid 1000) id 364601FE9C; Thu, 17 Jan 2013 19:15:21 +0100 (CET) Date: Thu, 17 Jan 2013 19:15:21 +0100 From: Agustin Martin To: 13460@debbugs.gnu.org Subject: Re: bug#13460: Issue to change dictionary when using hunspell on emacs Message-ID: <20130117181521.GB24961@agmartin.aq.upm.es> References: <20130116122509.GA2209@omega.in.herr-schmitt.de> <83hamh80ry.fsf@gnu.org> <838v7s8o26.fsf@gnu.org> <20130117122631.GA5097@agmartin.aq.upm.es> <20130117152416.GA32329@agmartin.aq.upm.es> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Score: -1.5 (-) X-Debbugs-Envelope-To: 13460 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.3 (--) On Thu, Jan 17, 2013 at 11:31:00AM -0500, Stefan Monnier wrote: > > There is a second issue I forgot, one needs to get info from the installed > > .aff files, so all them must be completely opened to look for that info > > (OTHERCHARS and friends) and I'd expect that to slow Emacs init a bit. > > We don't have to do that just to get the list of languages: it can be > delayed to the moment a particular language is selected. Good point, thanks. And that info can even be cached. I like this. -- Agustin From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 17 13:20:28 2013 Received: (at 13460) by debbugs.gnu.org; 17 Jan 2013 18:20:28 +0000 Received: from localhost ([127.0.0.1]:37275 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Tvu4e-0007tI-2L for submit@debbugs.gnu.org; Thu, 17 Jan 2013 13:20:28 -0500 Received: from fencepost.gnu.org ([208.118.235.10]:44202) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Tvu4Y-0007t8-EC for 13460@debbugs.gnu.org; Thu, 17 Jan 2013 13:20:22 -0500 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1Tvu3q-0008Ee-4d; Thu, 17 Jan 2013 13:19:34 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <20728.16566.19238.480349@gnu.org> Date: Thu, 17 Jan 2013 13:19:34 -0500 From: Glenn Morris To: Jochen Schmitt Subject: Re: bug#13460: Issue to change dictionary when using hunspell on emacs In-Reply-To: <20130117131733.GA20519@omega.in.herr-schmitt.de> References: <20130116122509.GA2209@omega.in.herr-schmitt.de> <83hamh80ry.fsf@gnu.org> <20130117131733.GA20519@omega.in.herr-schmitt.de> X-Attribution: GM X-Mailer: VM (www.wonderworks.com/vm), GNU Emacs (www.gnu.org/software/emacs) X-Hue: magenta X-Ran: a.#(uD$tMMV_R(:v&/'uMap;{Bbo({` List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.0 (-----) (Please keep the debbugs address cc'd. Resending your comments so that they are more visible.) Date: Thu, 17 Jan 2013 14:17:34 +0100 From: Jochen Schmitt I have try to create a suggestion for a general solution for this issue in the next release of emacs. I have attached a patch on this mail which introduced a alist to translate the dictionary names like 'english' in the form which will be accepted by hunspell. I have done a first short test to check out, that this is a working solution. Of course the ispell-hunspell-dictionary-alist need extension because I have put only two entries to be able to check out my solution. Best Regards: Jochen Schmitt diff -up emacs-24.2/lisp/textmodes/ispell.el.hunspell emacs-24.2/lisp/textmodes/ispell.el --- emacs-24.2/lisp/textmodes/ispell.el.hunspell 2013-01-17 13:17:45.389785784 +0100 +++ emacs-24.2/lisp/textmodes/ispell.el 2013-01-17 13:19:43.388797273 +0100 @@ -572,6 +572,13 @@ re-start Emacs." (coding-system :tag "Coding System"))) :group 'ispell) +(defvar ispell-hunspell-dictionary-alist + '((nil "en_GB") + ("english" "en_GB") + ("american" "en_US") + ) + "Associating list between apell and hunspell dictionaries names" +) (defvar ispell-dictionary-base-alist '((nil @@ -2610,7 +2617,9 @@ Keeps argument list for future ispell in (append (if (and ispell-current-dictionary ; Not for default dict (nil) (not (member "-d" orig-args))) ; Only define if not overridden. - (list "-d" ispell-current-dictionary)) + (list "-d" (if ispell-really-hunspell + (cadr (assoc ispell-current-dictionary ispell-hunspell-dictionary-alist)) + ispell-current-dictionary))) orig-args (if ispell-current-personal-dictionary ; Use specified pers dict. (list "-p" From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 17 13:44:34 2013 Received: (at 13460) by debbugs.gnu.org; 17 Jan 2013 18:44:34 +0000 Received: from localhost ([127.0.0.1]:37295 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TvuRx-0008TJ-Ss for submit@debbugs.gnu.org; Thu, 17 Jan 2013 13:44:34 -0500 Received: from mtaout20.012.net.il ([80.179.55.166]:63429) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TvuRs-0008T8-2F for 13460@debbugs.gnu.org; Thu, 17 Jan 2013 13:44:28 -0500 Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0MGS00E009B24K00@a-mtaout20.012.net.il> for 13460@debbugs.gnu.org; Thu, 17 Jan 2013 20:42:54 +0200 (IST) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MGS00DUW9BG97K0@a-mtaout20.012.net.il>; Thu, 17 Jan 2013 20:42:52 +0200 (IST) Date: Thu, 17 Jan 2013 20:42:58 +0200 From: Eli Zaretskii Subject: Re: bug#13460: Issue to change dictionary when using hunspell on emacs In-reply-to: <20130117181234.GA24961@agmartin.aq.upm.es> X-012-Sender: halo1@inter.net.il To: Agustin Martin Message-id: <83obgn7irx.fsf@gnu.org> References: <20130116122509.GA2209@omega.in.herr-schmitt.de> <83hamh80ry.fsf@gnu.org> <838v7s8o26.fsf@gnu.org> <20130117122631.GA5097@agmartin.aq.upm.es> <20130117152416.GA32329@agmartin.aq.upm.es> <83y5fr7oen.fsf@gnu.org> <20130117181234.GA24961@agmartin.aq.upm.es> X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: 13460 Cc: 13460@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: 0.2 (/) > Date: Thu, 17 Jan 2013 19:12:34 +0100 > From: Agustin Martin > > Sorry, I should have written WORDCHARS. Why do we need that? From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 17 13:44:58 2013 Received: (at 13460) by debbugs.gnu.org; 17 Jan 2013 18:44:58 +0000 Received: from localhost ([127.0.0.1]:37298 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TvuSQ-0008U1-E3 for submit@debbugs.gnu.org; Thu, 17 Jan 2013 13:44:58 -0500 Received: from fibonacci.ccupm.upm.es ([138.100.198.70]:43958 helo=smtp.upm.es) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TvuSO-0008Ts-7H for 13460@debbugs.gnu.org; Thu, 17 Jan 2013 13:44:57 -0500 Received: from agmartin.aq.upm.es (Agmartin.aq.upm.es [138.100.41.131]) by smtp.upm.es (8.14.3/8.14.3/fibonacci-001) with ESMTP id r0HIiClO027374; Thu, 17 Jan 2013 19:44:12 +0100 Received: by agmartin.aq.upm.es (Postfix, from userid 1000) id 396E81FE9C; Thu, 17 Jan 2013 19:44:12 +0100 (CET) Date: Thu, 17 Jan 2013 19:44:12 +0100 From: Agustin Martin To: 13460@debbugs.gnu.org Subject: Re: bug#13460: Issue to change dictionary when using hunspell on emacs Message-ID: <20130117184412.GA4933@agmartin.aq.upm.es> References: <20130116122509.GA2209@omega.in.herr-schmitt.de> <83hamh80ry.fsf@gnu.org> <838v7s8o26.fsf@gnu.org> <20130117122631.GA5097@agmartin.aq.upm.es> <20130117152416.GA32329@agmartin.aq.upm.es> <7076415.12428.1358446115519.JavaMail.root@mx1-new.spamfiltro.es> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7076415.12428.1358446115519.JavaMail.root@mx1-new.spamfiltro.es> User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Score: -1.5 (-) X-Debbugs-Envelope-To: 13460 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.5 (-) On Thu, Jan 17, 2013 at 01:08:30PM -0500, Glenn Morris wrote: > Agustin Martin wrote: > > > The problem is that hunspell -D does not return control. > [...] > > A workaround was proposed (redirecting from /dev/null), but it seems too > > UNIX biassed. > > "UNIX biased" -> "does not work on MS Windows" ? > > If the equivalent of "hunspell < null-device" works on MS Windows, > that's one problem easily solved, no? I do not use MS Windows myself, so I am just guessing possible problems. I was thinking about trying to start playing with /dev/null in my Debian box, but Eli proposed 'null-device' which seems better. Anyway, I'd like to have a look at this, but I am having little spare time now. Will try to find some time soon, but cannot promise. So, if someone did some work on this, is welcome. Regards, -- Agustin From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 17 14:07:24 2013 Received: (at 13460) by debbugs.gnu.org; 17 Jan 2013 19:07:24 +0000 Received: from localhost ([127.0.0.1]:37318 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Tvuo4-0000Yn-J1 for submit@debbugs.gnu.org; Thu, 17 Jan 2013 14:07:24 -0500 Received: from fibonacci.ccupm.upm.es ([138.100.198.70]:50013 helo=smtp.upm.es) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Tvuny-0000Yc-O3 for 13460@debbugs.gnu.org; Thu, 17 Jan 2013 14:07:19 -0500 Received: from agmartin.aq.upm.es (Agmartin.aq.upm.es [138.100.41.131]) by smtp.upm.es (8.14.3/8.14.3/fibonacci-001) with ESMTP id r0HJ6V6i029312; Thu, 17 Jan 2013 20:06:31 +0100 Received: by agmartin.aq.upm.es (Postfix, from userid 1000) id 65BE820662; Thu, 17 Jan 2013 20:06:31 +0100 (CET) Date: Thu, 17 Jan 2013 20:06:31 +0100 From: Agustin Martin To: 13460@debbugs.gnu.org Subject: Re: bug#13460: Issue to change dictionary when using hunspell on emacs Message-ID: <20130117190631.GA5181@agmartin.aq.upm.es> References: <20130116122509.GA2209@omega.in.herr-schmitt.de> <83hamh80ry.fsf@gnu.org> <838v7s8o26.fsf@gnu.org> <20130117122631.GA5097@agmartin.aq.upm.es> <20130117152416.GA32329@agmartin.aq.upm.es> <83y5fr7oen.fsf@gnu.org> <20130117181234.GA24961@agmartin.aq.upm.es> <11624660.12538.1358448223517.JavaMail.root@mx1-new.spamfiltro.es> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <11624660.12538.1358448223517.JavaMail.root@mx1-new.spamfiltro.es> User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Score: -1.5 (-) X-Debbugs-Envelope-To: 13460 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.2 (----) On Thu, Jan 17, 2013 at 08:42:58PM +0200, Eli Zaretskii wrote: > > Date: Thu, 17 Jan 2013 19:12:34 +0100 > > From: Agustin Martin > > > > Sorry, I should have written WORDCHARS. > > Why do we need that? This is what ispell.el calls otherchars. Parsing WORDCHARS ensures that both hunspell and ispell.el think about the same characters in that category. -- Agustin From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 17 14:31:16 2013 Received: (at 13460) by debbugs.gnu.org; 17 Jan 2013 19:31:17 +0000 Received: from localhost ([127.0.0.1]:37347 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TvvBE-00017c-LF for submit@debbugs.gnu.org; Thu, 17 Jan 2013 14:31:16 -0500 Received: from edison.ccupm.upm.es ([138.100.198.71]:35602 helo=smtp.upm.es) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TvvBB-00017R-PO for 13460@debbugs.gnu.org; Thu, 17 Jan 2013 14:31:15 -0500 Received: from agmartin.aq.upm.es (Agmartin.aq.upm.es [138.100.41.131]) by smtp.upm.es (8.14.3/8.14.3/edison-001) with ESMTP id r0HJUUWG015571; Thu, 17 Jan 2013 20:30:30 +0100 Received: by agmartin.aq.upm.es (Postfix, from userid 1000) id EB65C1FE9C; Thu, 17 Jan 2013 20:30:29 +0100 (CET) Date: Thu, 17 Jan 2013 20:30:29 +0100 From: Agustin Martin To: 13460@debbugs.gnu.org, Jochen Schmitt Subject: Re: bug#13460: Issue to change dictionary when using hunspell on emacs Message-ID: <20130117193029.GB4933@agmartin.aq.upm.es> References: <20130116122509.GA2209@omega.in.herr-schmitt.de> <83hamh80ry.fsf@gnu.org> <20130117131733.GA20519@omega.in.herr-schmitt.de> <20728.16566.19238.480349@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20728.16566.19238.480349@gnu.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Score: -1.5 (-) X-Debbugs-Envelope-To: 13460 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.3 (--) From: Jochen Schmitt > > I have try to create a suggestion for a general solution for > this issue in the next release of emacs. > > I have attached a patch on this mail which introduced a alist to > translate the dictionary names like 'english' in the form which will > be accepted by hunspell. > > I have done a first short test to check out, that this is a > working solution. > > Of course the ispell-hunspell-dictionary-alist need extension because > I have put only two entries to be able to check out my solution. Hi Jochen. Thanks a lot for your feedback (and to Glenn for forwarding it), you can send your followups to the bug address. I remember to have done some initial work with an alias file for hunspell, but I do not find that now. I'd keep the name `ispell-hunspell-dictionary-alist' for the alist of actually found dicts, once implemented in one way or another. I vaguely remember using something like `ispell-hunspell-dictionary-equivs-alist' for the purpose of having a list of equivalences. I'd also not hardcode nil to "en_GB". For the rest I think it can be useful as a temporary workaround, but I'd prefer to see these changes in a sanitized dictionary alist for hunspell, something similar to what is done in `ispell-set-spellchecker-params' to use [:alpha:] when possible, but for this purpose and limited to the original base alist. Otherwise will only work for entries not using explicit "-d" and may hide personal choices in ~/.emacs pointing to non-standard locations (e.g., "american" using "~/personal/en_US". (Looked quickly, may be I missed something) Let me try to find where I have my previous work and what is harder, try to find the time. This should not be that time consuming, so I expect to look at this shortly. Thanks again. Regards. -- Agustin From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 17 14:37:39 2013 Received: (at 13460) by debbugs.gnu.org; 17 Jan 2013 19:37:39 +0000 Received: from localhost ([127.0.0.1]:37365 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TvvHL-0001GZ-5z for submit@debbugs.gnu.org; Thu, 17 Jan 2013 14:37:39 -0500 Received: from mtaout21.012.net.il ([80.179.55.169]:63331) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TvvHF-0001GI-Of for 13460@debbugs.gnu.org; Thu, 17 Jan 2013 14:37:34 -0500 Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0MGS00E00BPVD800@a-mtaout21.012.net.il> for 13460@debbugs.gnu.org; Thu, 17 Jan 2013 21:36:03 +0200 (IST) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MGS00E2ZBS38T60@a-mtaout21.012.net.il>; Thu, 17 Jan 2013 21:36:03 +0200 (IST) Date: Thu, 17 Jan 2013 21:36:09 +0200 From: Eli Zaretskii Subject: Re: bug#13460: Issue to change dictionary when using hunspell on emacs In-reply-to: <20130117190631.GA5181@agmartin.aq.upm.es> X-012-Sender: halo1@inter.net.il To: Agustin Martin Message-id: <83k3rb7gba.fsf@gnu.org> References: <20130116122509.GA2209@omega.in.herr-schmitt.de> <83hamh80ry.fsf@gnu.org> <838v7s8o26.fsf@gnu.org> <20130117122631.GA5097@agmartin.aq.upm.es> <20130117152416.GA32329@agmartin.aq.upm.es> <83y5fr7oen.fsf@gnu.org> <20130117181234.GA24961@agmartin.aq.upm.es> <11624660.12538.1358448223517.JavaMail.root@mx1-new.spamfiltro.es> <20130117190631.GA5181@agmartin.aq.upm.es> X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: 13460 Cc: 13460@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.2 (-) > Date: Thu, 17 Jan 2013 20:06:31 +0100 > From: Agustin Martin > > On Thu, Jan 17, 2013 at 08:42:58PM +0200, Eli Zaretskii wrote: > > > Date: Thu, 17 Jan 2013 19:12:34 +0100 > > > From: Agustin Martin > > > > > > Sorry, I should have written WORDCHARS. > > > > Why do we need that? > > This is what ispell.el calls otherchars. Parsing WORDCHARS ensures that both > hunspell and ispell.el think about the same characters in that category. I think you are mistaken, that's not my reading of hunspell(4). From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 18 12:05:53 2013 Received: (at 13460) by debbugs.gnu.org; 18 Jan 2013 17:05:53 +0000 Received: from localhost ([127.0.0.1]:38976 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TwFO4-00085R-Su for submit@debbugs.gnu.org; Fri, 18 Jan 2013 12:05:53 -0500 Received: from fibonacci.ccupm.upm.es ([138.100.198.70]:45326 helo=smtp.upm.es) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TwFO2-00085I-Hg for 13460@debbugs.gnu.org; Fri, 18 Jan 2013 12:05:52 -0500 Received: from agmartin.aq.upm.es (Agmartin.aq.upm.es [138.100.41.131]) by smtp.upm.es (8.14.3/8.14.3/fibonacci-001) with ESMTP id r0IH51B8024377; Fri, 18 Jan 2013 18:05:01 +0100 Received: by agmartin.aq.upm.es (Postfix, from userid 1000) id 5B8AC381; Fri, 18 Jan 2013 18:05:01 +0100 (CET) Date: Fri, 18 Jan 2013 18:05:01 +0100 From: Agustin Martin To: 13460@debbugs.gnu.org Subject: Re: bug#13460: Issue to change dictionary when using hunspell on emacs Message-ID: <20130118170501.GA9786@agmartin.aq.upm.es> References: <20130116122509.GA2209@omega.in.herr-schmitt.de> <83hamh80ry.fsf@gnu.org> <20130117131733.GA20519@omega.in.herr-schmitt.de> <20728.16566.19238.480349@gnu.org> <20130117193029.GB4933@agmartin.aq.upm.es> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="dDRMvlgZJXvWKvBx" Content-Disposition: inline In-Reply-To: <20130117193029.GB4933@agmartin.aq.upm.es> User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Score: -1.5 (-) X-Debbugs-Envelope-To: 13460 Cc: Jochen Schmitt X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.2 (----) --dDRMvlgZJXvWKvBx Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Jan 17, 2013 at 08:30:29PM +0100, Agustin Martin wrote: > From: Jochen Schmitt > > > > I have try to create a suggestion for a general solution for > > this issue in the next release of emacs. > > > > I have attached a patch on this mail which introduced a alist to > > translate the dictionary names like 'english' in the form which will > > be accepted by hunspell. > > > > I have done a first short test to check out, that this is a > > working solution. > > > > Of course the ispell-hunspell-dictionary-alist need extension because > > I have put only two entries to be able to check out my solution. > > Hi Jochen. Thanks a lot for your feedback (and to Glenn for forwarding it), > you can send your followups to the bug address. > > I remember to have done some initial work with an alias file for hunspell, > but I do not find that now. > > I'd keep the name `ispell-hunspell-dictionary-alist' for the alist of > actually found dicts, once implemented in one way or another. I vaguely > remember using something like `ispell-hunspell-dictionary-equivs-alist' for > the purpose of having a list of equivalences. I'd also not hardcode nil to > "en_GB". > > For the rest I think it can be useful as a temporary workaround, but I'd > prefer to see these changes in a sanitized dictionary alist for hunspell, > something similar to what is done in `ispell-set-spellchecker-params' to use > [:alpha:] when possible, but for this purpose and limited to the original > base alist. Otherwise will only work for entries not using explicit "-d" > and may hide personal choices in ~/.emacs pointing to non-standard locations > (e.g., "american" using "~/personal/en_US". (Looked quickly, may be I missed > something) > > Let me try to find where I have my previous work and what is harder, try to > find the time. This should not be that time consuming, so I expect to look > at this shortly. I have been playing with this. Please see attached patch for current status. There are a couple of minor things I would like to think about first. Current changes explicitly set "english" to one of the two main choices ("en_GB"). This is not something I like very much and I am aware that people is sensitive about this. I'd prefer to associate it with plain "en", but hunspell has some pending issues regarding fallback values. Since there should be mapppings for all (but nil) default dict definitions, and this is only done for those dicts I am also considering to show an error if an expected mappping is not found, but this is a really minor internal issue just to help finding missing mappings early. I will test these changes a bit more and if no problems appear will commit early next week. Feedback is welcome. Thanks again for your suggestions. -- Agustin --dDRMvlgZJXvWKvBx Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="ispell.el_hunspell-default-dict-names-mapping.diff" --- ispell.el.orig 2013-01-18 15:35:17.804804007 +0100 +++ ispell.el 2013-01-18 18:03:01.017847901 +0100 @@ -773,6 +773,41 @@ (make-obsolete-variable 'ispell-aspell-supports-utf8 'ispell-encoding8-command "23.1") +(defvar ispell-hunspell-dictionary-equivs-alist + '(("american" "en_US") + ("brasileiro" "pt_BR") + ("british" "en_GB") + ("castellano" "es_ES") + ("castellano8" "es_ES") + ("czech" "cs_CZ") + ("dansk" "da_DK") + ("deutsch" "de_DE") + ("deutsch8" "de_DE") + ("english" "en_GB") + ("esperanto" "eo") + ("esperanto-tex" "eo") + ("finnish" "fi_FI") + ("francais7" "fr_FR") + ("francais" "fr_FR") + ("francais-tex" "fr_FR") + ("german" "de_DE") + ("german8" "de_DE") + ("italiano" "it_IT") + ("nederlands" "nl_NL") + ("nederlands8" "nl_NL") + ("norsk" "nn_NO") + ("norsk7-tex" "nn_NO") + ("polish" "pl_PL") + ("portugues" "pt_PT") + ("russian" "ru_RU") + ("russianw" "ru_RU") + ("slovak" "sk_SK") + ("slovenian" "sl_SI") + ("svenska" "sv_SE") + ("hebrew" "he_IL")) + "Alist with matching hunspell dict names for standard dict names in + `ispell-dictionary-base-alist'.") + (defvar ispell-emacs-alpha-regexp (if (string-match "^[[:alpha:]]+$" "abcde") "[[:alpha:]]" @@ -1134,9 +1169,52 @@ ispell-encoding8-command) ispell-aspell-dictionary-alist nil)) + (ispell-dictionary-base-alist ispell-dictionary-base-alist) ispell-base-dicts-override-alist ; Override only base-dicts-alist all-dicts-alist) + ;; While ispell and aspell (through aliases) use the traditional + ;; dict naming originally expected by ispell.el, hunspell + ;; uses locale based names with no alias. We need to map + ;; standard names to locale based names to make default dict + ;; definitions available for hunspell. + (if ispell-really-hunspell + (let (tmp-dicts-alist) + (dolist (adict ispell-dictionary-base-alist) + (let* ((dict-name (nth 0 adict)) + (ispell-args (nth 5 adict)) + (ispell-args-has-d (member "-d" ispell-args))) + ;; Remove "-d" option from `ispell-args' if present + (if ispell-args-has-d + (let ((ispell-args-after-d + (cdr (cdr ispell-args-has-d))) + (ispell-args-before-d + (butlast ispell-args (length ispell-args-has-d)))) + (setq ispell-args + (nconc ispell-args-before-d + ispell-args-after-d)))) + ;; Unless default dict, re-add "-d" option with the mapped value + (if dict-name + (nconc ispell-args + (list "-d" + (or (cadr (assoc + dict-name + ispell-hunspell-dictionary-equivs-alist)) + dict-name)))) + + (add-to-list 'tmp-dicts-alist + (list + dict-name ; dict name + (nth 1 adict) ; casechars + (nth 2 adict) ; not-casechars + (nth 3 adict) ; otherchars + (nth 4 adict) ; many-otherchars-p + ispell-args ; ispell-args + (nth 6 adict) ; extended-character-mode + (nth 7 adict) ; dict encoding + ))) + (setq ispell-dictionary-base-alist tmp-dicts-alist)))) + (run-hooks 'ispell-initialize-spellchecker-hook) ;; Add dicts to ``ispell-dictionary-alist'' unless already present. --dDRMvlgZJXvWKvBx-- From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 18 13:04:40 2013 Received: (at 13460) by debbugs.gnu.org; 18 Jan 2013 18:04:40 +0000 Received: from localhost ([127.0.0.1]:39022 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TwGIy-000211-1P for submit@debbugs.gnu.org; Fri, 18 Jan 2013 13:04:40 -0500 Received: from moutng.kundenserver.de ([212.227.17.8]:58570) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TwGIt-00020q-Ef for 13460@debbugs.gnu.org; Fri, 18 Jan 2013 13:04:38 -0500 Received: from omega.in.herr-schmitt.de (p549AF3F8.dip.t-dialin.net [84.154.243.248]) by mrelayeu.kundenserver.de (node=mrbap2) with ESMTP (Nemesis) id 0MTNxP-1TXKvV2ObX-00S748; Fri, 18 Jan 2013 19:03:47 +0100 Received: from omega.in.herr-schmitt.de (localhost [127.0.0.1]) by omega.in.herr-schmitt.de (8.14.6/8.14.5) with ESMTP id r0II3ahM002681 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for <13460@debbugs.gnu.org>; Fri, 18 Jan 2013 19:03:36 +0100 Received: (from s4504kr@localhost) by omega.in.herr-schmitt.de (8.14.6/8.14.5/Submit) id r0II3YYO002680 for 13460@debbugs.gnu.org; Fri, 18 Jan 2013 19:03:34 +0100 Date: Fri, 18 Jan 2013 19:03:34 +0100 From: Jochen Schmitt To: 13460@debbugs.gnu.org Subject: Re: bug#13460: Issue to change dictionary when using hunspell on emacs Message-ID: <20130118180321.GA2635@omega.in.herr-schmitt.de> References: <20130116122509.GA2209@omega.in.herr-schmitt.de> <83hamh80ry.fsf@gnu.org> <20130117131733.GA20519@omega.in.herr-schmitt.de> <20728.16566.19238.480349@gnu.org> <20130117193029.GB4933@agmartin.aq.upm.es> <20130118170501.GA9786@agmartin.aq.upm.es> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20130118170501.GA9786@agmartin.aq.upm.es> User-Agent: Mutt/1.5.21 (2010-09-15) X-Provags-ID: V02:K0:hHJQcVldNmNa1U4uBhhbYx40YJsv4AOaG3OGYvAF+Ux RhMJgMQAtQT6TjmYyBepuQ0LB+Q8hYy4YRLPyOBT2JQSYHQsWm p+kz4nKF7Wx62WqslSYIHn1Vq1vQReUCVr1KK7/6dfYyv/ceJ+ soGD9zP7tcH12kvImcI/wXNcmSBn42ROqmHCMsjMqB0hQeNDmP +tV82VwH/KhUbyHtnZ8iMqjnVvyIf52vM/zxoTVxkxV+PaHv8E G/g/MV4lk2iFkPndL1aK3ju4fEisFZoPCifLPn9ujn3y9p+3kd 1pag48q+ZoOgzHi3QjooCTEzKlLl35AUz+es0lw8vJDYATO1QJ qMlizBMtpjbSR2todNbtVxTo/8Jxw0uLZ8rhFtA1sAiWmGcYSJ I37i6/BZYGbftrjS8PZKAqYOpKA+3EhuLQ= X-Spam-Score: 0.8 (/) X-Debbugs-Envelope-To: 13460 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: 0.8 (/) On Fri, Jan 18, 2013 at 06:05:01PM +0100, Agustin Martin wrote: > On Thu, Jan 17, 2013 at 08:30:29PM +0100, Agustin Martin wrote: > There are a couple of minor things I would like to think about first. > > Current changes explicitly set "english" to one of the two main choices > ("en_GB"). This is not something I like very much and I am aware that > people is sensitive about this. I'd prefer to associate it with plain "en", > I have find out, that hunspell wiel accecpt -d en_GB,en_US as an parameter, so this issue may be fixed. > I will test these changes a bit more and if no problems appear will commit > early next week. Feedback is welcome. > I will be happy, if you can notifiy me about the state of your work, because I want that this patch may be integrated in the official emacs package of Fedora Linux. This is important from my point of view, because hunspell is the default spell checking application in Fedora. Best Regards: Jochen Schmitt From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 18 14:04:01 2013 Received: (at 13460) by debbugs.gnu.org; 18 Jan 2013 19:04:01 +0000 Received: from localhost ([127.0.0.1]:39066 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TwHEO-0003S1-Q7 for submit@debbugs.gnu.org; Fri, 18 Jan 2013 14:04:01 -0500 Received: from mtaout21.012.net.il ([80.179.55.169]:50063) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TwHEM-0003Rr-Hu for 13460@debbugs.gnu.org; Fri, 18 Jan 2013 14:03:59 -0500 Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0MGU00K004HSG000@a-mtaout21.012.net.il> for 13460@debbugs.gnu.org; Fri, 18 Jan 2013 21:03:08 +0200 (IST) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MGU00KZE4X8G710@a-mtaout21.012.net.il>; Fri, 18 Jan 2013 21:03:08 +0200 (IST) Date: Fri, 18 Jan 2013 21:03:17 +0200 From: Eli Zaretskii Subject: Re: bug#13460: Issue to change dictionary when using hunspell on emacs In-reply-to: <20130118180321.GA2635@omega.in.herr-schmitt.de> X-012-Sender: halo1@inter.net.il To: Jochen Schmitt Message-id: <83vcau5n62.fsf@gnu.org> References: <20130116122509.GA2209@omega.in.herr-schmitt.de> <83hamh80ry.fsf@gnu.org> <20130117131733.GA20519@omega.in.herr-schmitt.de> <20728.16566.19238.480349@gnu.org> <20130117193029.GB4933@agmartin.aq.upm.es> <20130118170501.GA9786@agmartin.aq.upm.es> <20130118180321.GA2635@omega.in.herr-schmitt.de> X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: 13460 Cc: 13460@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: 0.2 (/) > Date: Fri, 18 Jan 2013 19:03:34 +0100 > From: Jochen Schmitt > > I have find out, that hunspell wiel accecpt -d en_GB,en_US as > an parameter, so this issue may be fixed. Beware: when you invoke hunspell like that, it uses the .aff file from the first dictionary only, and ignores any .aff files of the other dictionaries. This could bite you where US and GB English differ. In general, this option is meant to support _additional_ dictionaries in the same language, like if you want to use a specialized dictionary for medicine or some other discipline, together with a general-purpose dictionary for the same language. From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 18 14:06:35 2013 Received: (at 13460) by debbugs.gnu.org; 18 Jan 2013 19:06:35 +0000 Received: from localhost ([127.0.0.1]:39078 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TwHGt-0003Wz-21 for submit@debbugs.gnu.org; Fri, 18 Jan 2013 14:06:35 -0500 Received: from fibonacci.ccupm.upm.es ([138.100.198.70]:57721 helo=smtp.upm.es) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TwHGp-0003Wp-3S for 13460@debbugs.gnu.org; Fri, 18 Jan 2013 14:06:33 -0500 Received: from agmartin.aq.upm.es (Agmartin.aq.upm.es [138.100.41.131]) by smtp.upm.es (8.14.3/8.14.3/fibonacci-001) with ESMTP id r0IJ5fku001703; Fri, 18 Jan 2013 20:05:42 +0100 Received: by agmartin.aq.upm.es (Postfix, from userid 1000) id D5CC438E; Fri, 18 Jan 2013 20:05:41 +0100 (CET) Date: Fri, 18 Jan 2013 20:05:41 +0100 From: Agustin Martin To: 13460@debbugs.gnu.org Subject: Re: bug#13460: Issue to change dictionary when using hunspell on emacs Message-ID: <20130118190541.GA2194@agmartin.aq.upm.es> References: <20130116122509.GA2209@omega.in.herr-schmitt.de> <83hamh80ry.fsf@gnu.org> <20130117131733.GA20519@omega.in.herr-schmitt.de> <20728.16566.19238.480349@gnu.org> <20130117193029.GB4933@agmartin.aq.upm.es> <20130118170501.GA9786@agmartin.aq.upm.es> <20130118180321.GA2635@omega.in.herr-schmitt.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20130118180321.GA2635@omega.in.herr-schmitt.de> User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Score: -1.5 (-) X-Debbugs-Envelope-To: 13460 Cc: Jochen Schmitt X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.5 (-) On Fri, Jan 18, 2013 at 07:03:34PM +0100, Jochen Schmitt wrote: > On Fri, Jan 18, 2013 at 06:05:01PM +0100, Agustin Martin wrote: > > On Thu, Jan 17, 2013 at 08:30:29PM +0100, Agustin Martin wrote: > > There are a couple of minor things I would like to think about first. > > > > Current changes explicitly set "english" to one of the two main choices > > ("en_GB"). This is not something I like very much and I am aware that > > people is sensitive about this. I'd prefer to associate it with plain "en", > > > > I have find out, that hunspell wiel accecpt -d en_GB,en_US as > an parameter, so this issue may be fixed. Thanks for the info. I am not native English, so I am a bit unsure that this is the desired behavior, people may get puzzled by "english" accepting simultaneously "center/centre", "colour/color" and friends. What native English people think about this? There is also the fact that first dict in that list must always be installed, otherwise we get the dict not found error. In most setups both dicts are installed, so this should not be a big problem, but I'd put first the most popular, en_US. > > I will test these changes a bit more and if no problems appear will commit > > early next week. Feedback is welcome. > > > I will be happy, if you can notifiy me about the state of your work, > because I want that this patch may be integrated in the official > emacs package of Fedora Linux. This is important from my point of > view, because hunspell is the default spell checking application > in Fedora. Once I commit changes I will close the bug report and you will receive a message about it. If you want the final diff I can attach it to the closing message. Regards, -- Agustin From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 18 14:24:38 2013 Received: (at 13460) by debbugs.gnu.org; 18 Jan 2013 19:24:38 +0000 Received: from localhost ([127.0.0.1]:39097 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TwHYL-0003yi-Mx for submit@debbugs.gnu.org; Fri, 18 Jan 2013 14:24:38 -0500 Received: from edison.ccupm.upm.es ([138.100.198.71]:58854 helo=smtp.upm.es) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TwHYJ-0003ya-0O for 13460@debbugs.gnu.org; Fri, 18 Jan 2013 14:24:36 -0500 Received: from agmartin.aq.upm.es (Agmartin.aq.upm.es [138.100.41.131]) by smtp.upm.es (8.14.3/8.14.3/edison-001) with ESMTP id r0IJNjLl025598; Fri, 18 Jan 2013 20:23:45 +0100 Received: by agmartin.aq.upm.es (Postfix, from userid 1000) id D546738E; Fri, 18 Jan 2013 20:23:45 +0100 (CET) Date: Fri, 18 Jan 2013 20:23:45 +0100 From: Agustin Martin To: 13460@debbugs.gnu.org Subject: Re: bug#13460: Issue to change dictionary when using hunspell on emacs Message-ID: <20130118192345.GA2554@agmartin.aq.upm.es> References: <20130116122509.GA2209@omega.in.herr-schmitt.de> <83hamh80ry.fsf@gnu.org> <20130117131733.GA20519@omega.in.herr-schmitt.de> <20728.16566.19238.480349@gnu.org> <20130117193029.GB4933@agmartin.aq.upm.es> <20130118170501.GA9786@agmartin.aq.upm.es> <20130118180321.GA2635@omega.in.herr-schmitt.de> <83vcau5n62.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <83vcau5n62.fsf@gnu.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Score: -1.5 (-) X-Debbugs-Envelope-To: 13460 Cc: Jochen Schmitt X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.8 (--) On Fri, Jan 18, 2013 at 09:03:17PM +0200, Eli Zaretskii wrote: > > Date: Fri, 18 Jan 2013 19:03:34 +0100 > > From: Jochen Schmitt > > > > I have find out, that hunspell wiel accecpt -d en_GB,en_US as > > an parameter, so this issue may be fixed. > > Beware: when you invoke hunspell like that, it uses the .aff file from > the first dictionary only, and ignores any .aff files of the other > dictionaries. This could bite you where US and GB English differ. > > In general, this option is meant to support _additional_ dictionaries > in the same language, like if you want to use a specialized dictionary > for medicine or some other discipline, together with a general-purpose > dictionary for the same language. Replied to Jochen message just before receiving your message and noticing that I forgot that this indeed was for additional dictionaries and that only first aff is used, thanks for reminding. I can now think about another possible problem with this. hunspell accepts both hunspell only and old myspell dicts. If e.g. en_GB has a myspell aff file (and .dic file for that .aff file) and en_US a hunspell only one (and associated .dic file for it), when using "-d en_GB,en_US" interaction may become at least strange if not unpredictable. -- Agustin From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 21 04:44:55 2013 Received: (at 13460) by debbugs.gnu.org; 21 Jan 2013 09:44:55 +0000 Received: from localhost ([127.0.0.1]:42325 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TxDvz-0005Zy-7T for submit@debbugs.gnu.org; Mon, 21 Jan 2013 04:44:55 -0500 Received: from moutng.kundenserver.de ([212.227.126.187]:53594) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TxDvw-0005Zo-N3 for 13460@debbugs.gnu.org; Mon, 21 Jan 2013 04:44:53 -0500 Received: from omega.in.herr-schmitt.de (p549AEE61.dip.t-dialin.net [84.154.238.97]) by mrelayeu.kundenserver.de (node=mreu3) with ESMTP (Nemesis) id 0MZbAH-1Tc6X317LZ-00LGNo; Mon, 21 Jan 2013 10:43:48 +0100 Received: from omega.in.herr-schmitt.de (localhost [127.0.0.1]) by omega.in.herr-schmitt.de (8.14.6/8.14.5) with ESMTP id r0L9hgHn001897 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for <13460@debbugs.gnu.org>; Mon, 21 Jan 2013 10:43:42 +0100 Received: (from s4504kr@localhost) by omega.in.herr-schmitt.de (8.14.6/8.14.5/Submit) id r0L9heV8001896 for 13460@debbugs.gnu.org; Mon, 21 Jan 2013 10:43:40 +0100 Date: Mon, 21 Jan 2013 10:43:40 +0100 From: Jochen Schmitt To: 13460@debbugs.gnu.org Subject: Re: bug#13460: Issue to change dictionary when using hunspell on emacs Message-ID: <20130121094338.GC1809@omega.in.herr-schmitt.de> References: <20130116122509.GA2209@omega.in.herr-schmitt.de> <83hamh80ry.fsf@gnu.org> <20130117131733.GA20519@omega.in.herr-schmitt.de> <20728.16566.19238.480349@gnu.org> <20130117193029.GB4933@agmartin.aq.upm.es> <20130118170501.GA9786@agmartin.aq.upm.es> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="hOcCNbCCxyk/YU74" Content-Disposition: inline In-Reply-To: <20130118170501.GA9786@agmartin.aq.upm.es> User-Agent: Mutt/1.5.21 (2010-09-15) X-Provags-ID: V02:K0:Rc0LwlR4wF0zyHv7qvyaZxQO0wVeuf2IEHHLoxSEmY8 /7fCqSVfN3IDmM+KKn8uxkzioI9P0ug/OzG64zZg6HlFDSiGsD SwAlwAqmyyVFVVZstusyxo9ksiAUGZb0ELkFHayGTL61miROen pbnQNAghTJQlNNudNl4GEijadnKZ8vtb/lacyX4HkZWJozt0XU gQE967ikTeDPkpUqdyurGOUdj04+lz+ujO6jCC8NB1k/VlqGPu zKt0uJ+BB8C7BHkSViptlyF+h2bdrB3TNfp7gGHrKlPZ4aFugi XJFyWRISnzrwBGD5sRTmvWVSSLQmyfhe+ePwuJaGrgAea1mW/e YhGEwJPbYwqGWqlv4i4fIzNJWgpG8E0BTseyy5WPshsuEi9RxT u9bW8HKCKvI8Q== X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 13460 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: 0.3 (/) --hOcCNbCCxyk/YU74 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Fri, Jan 18, 2013 at 06:05:01PM +0100, Agustin Martin wrote: > I have been playing with this. Please see attached patch for current status. > There are a couple of minor things I would like to think about first. > > Current changes explicitly set "english" to one of the two main choices > ("en_GB"). This is not something I like very much and I am aware that > people is sensitive about this. I'd prefer to associate it with plain "en", > but hunspell has some pending issues regarding fallback values. > > Since there should be mapppings for all (but nil) default dict definitions, > and this is only done for those dicts I am also considering to show an error > if an expected mappping is not found, but this is a really minor internal > issue just to help finding missing mappings early. > > I will test these changes a bit more and if no problems appear will commit > early next week. Feedback is welcome. I have add a monor change to your suggested patch to generate an error message, if a language doesn't exist in ispell-hunspell-equivs-alist. My tests show, that this parch works as expected. I have attached the modified version of the patch on this mail. Best Regards: Jochen Schmitt --hOcCNbCCxyk/YU74 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="emacs-24.2-hunspell.patch" diff -up emacs-24.2/lisp/textmodes/ispell.el.hunspell emacs-24.2/lisp/textmodes/ispell.el --- emacs-24.2/lisp/textmodes/ispell.el.hunspell 2013-01-19 12:38:21.365802034 +0100 +++ emacs-24.2/lisp/textmodes/ispell.el 2013-01-19 14:32:10.527026717 +0100 @@ -572,6 +572,40 @@ re-start Emacs." (coding-system :tag "Coding System"))) :group 'ispell) +(defvar ispell-hunspell-dictionary-equivs-alist + '(("american" "en_US") + ("brasileiro" "pt_BR") + ("british" "en_GB") + ("castellano" "es_ES") + ("castellano8" "es_ES") + ("czech" "cs_CZ") + ("dansk" "da_DK") + ("deutsch" "de_DE") + ("deutsch8" "de_DE") + ("english" "en_GB,en_US") + ("esperanto" "eo") + ("esperanto-tex" "eo") + ("finnish" "fi_FI") + ("francais7" "fr_FR") + ("francais" "fr_FR") + ("francais-tex" "fr_FR") + ("german" "de_DE") + ("german8" "de_DE") + ("italiano" "it_IT") + ("nederlands" "nl_NL") + ("nederlands8" "nl_NL") + ("norsk" "nn_NO") + ("norsk7-tex" "nn_NO") + ("polish" "pl_PL") + ("portugues" "pt_PT") + ("russian" "ru_RU") + ("russianw" "ru_RU") + ("slovak" "sk_SK") + ("slovenian" "sl_SI") + ("svenska" "sv_SE") + ("hebrew" "he_IL")) + "Alist with matching hunspell dict names for standard dict names in + `ispell-dictionary-base-alist'.") (defvar ispell-dictionary-base-alist '((nil @@ -1077,9 +1111,15 @@ time, before `ispell-dictionary-alist' i sysadmins to override entries in `ispell-dictionary-base-alist' by putting those overrides in `ispell-base-dicts-override-alist', which is a dynamically scoped var with same format as `ispell-dictionary-alist'. -This alist will not override the auto-detected values (e.g. if a recent +This alist will no<<<<<<<<<<<<) id 1TxKd1-0000mR-NR for submit@debbugs.gnu.org; Mon, 21 Jan 2013 11:53:48 -0500 Received: from fibonacci.ccupm.upm.es ([138.100.198.70]:43261 helo=smtp.upm.es) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TxKcy-0000mI-5C for 13460-done@debbugs.gnu.org; Mon, 21 Jan 2013 11:53:45 -0500 Received: from agmartin.aq.upm.es (Agmartin.aq.upm.es [138.100.41.131]) by smtp.upm.es (8.14.3/8.14.3/fibonacci-001) with ESMTP id r0LGqckc009445; Mon, 21 Jan 2013 17:52:38 +0100 Received: by agmartin.aq.upm.es (Postfix, from userid 1000) id 3138548B; Mon, 21 Jan 2013 17:52:38 +0100 (CET) Date: Mon, 21 Jan 2013 17:52:38 +0100 From: Agustin Martin To: 13460-done@debbugs.gnu.org Subject: Re: bug#13460: Issue to change dictionary when using hunspell on emacs Message-ID: <20130121165237.GA31070@agmartin.aq.upm.es> References: <20130116122509.GA2209@omega.in.herr-schmitt.de> <83hamh80ry.fsf@gnu.org> <20130117131733.GA20519@omega.in.herr-schmitt.de> <20728.16566.19238.480349@gnu.org> <20130117193029.GB4933@agmartin.aq.upm.es> <20130118170501.GA9786@agmartin.aq.upm.es> <20130118180321.GA2635@omega.in.herr-schmitt.de> <20130118190541.GA2194@agmartin.aq.upm.es> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20130118190541.GA2194@agmartin.aq.upm.es> User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Score: -1.5 (-) X-Debbugs-Envelope-To: 13460-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.5 (-) On Fri, Jan 18, 2013 at 08:05:41PM +0100, Agustin Martin wrote: > On Fri, Jan 18, 2013 at 07:03:34PM +0100, Jochen Schmitt wrote: > > On Fri, Jan 18, 2013 at 06:05:01PM +0100, Agustin Martin wrote: > > > I will test these changes a bit more and if no problems appear will commit > > > early next week. Feedback is welcome. > > > > > I will be happy, if you can notifiy me about the state of your work, > > because I want that this patch may be integrated in the official > > emacs package of Fedora Linux. This is important from my point of > > view, because hunspell is the default spell checking application > > in Fedora. > > Once I commit changes I will close the bug report and you will receive a > message about it. If you want the final diff I can attach it to the closing > message. Fix committed, closing bug report. For english I left en_US alone. For the reasons shown in the bug thread I think is not a good idea to mix them. I have relaxed a bit the check, if a standard dict does not have an associated hunspell mapping it is ignored for hunspell with a warning, so error message will only appear when trying to use that dict instead of everytime hunspell is used as spellchecker. Regards, -- Agustin From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 06 13:20:35 2013 Received: (at control) by debbugs.gnu.org; 6 Feb 2013 18:20:35 +0000 Received: from localhost ([127.0.0.1]:39664 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U39bn-0003mU-8D for submit@debbugs.gnu.org; Wed, 06 Feb 2013 13:20:35 -0500 Received: from edison.ccupm.upm.es ([138.100.198.71]:42368 helo=smtp.upm.es) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U39bk-0003mL-QD for control@debbugs.gnu.org; Wed, 06 Feb 2013 13:20:33 -0500 Received: from agmartin.aq.upm.es (Agmartin.aq.upm.es [138.100.41.131]) by smtp.upm.es (8.14.3/8.14.3/edison-001) with ESMTP id r16IJDcK011493; Wed, 6 Feb 2013 19:19:13 +0100 Received: by agmartin.aq.upm.es (Postfix, from userid 1000) id C571B513; Wed, 6 Feb 2013 19:19:13 +0100 (CET) Date: Wed, 6 Feb 2013 19:19:13 +0100 From: Agustin Martin To: control@debbugs.gnu.org Subject: Clone as a specific bug report for ongoing hunspell dicts autodetection Message-ID: <20130206181913.GA29986@agmartin.aq.upm.es> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Score: -1.5 (-) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.3 (--) clone 13460 -1 retitle -1 ispell.el: hunspell dicts autodetection under Emacs. reopen -1 tag -1 +pending From unknown Sun Aug 17 22:02:33 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 07 Mar 2013 12:24:05 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator