From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Agustin Martin Newsgroups: gmane.emacs.bugs Subject: bug#13460: Issue to change dictionary when using hunspell on emacs Date: Thu, 17 Jan 2013 16:24:16 +0100 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> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1358436329 2728 80.91.229.3 (17 Jan 2013 15:25:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 17 Jan 2013 15:25:29 +0000 (UTC) To: 13460@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Jan 17 16:25:48 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TvrLb-0005dd-5M for geb-bug-gnu-emacs@m.gmane.org; Thu, 17 Jan 2013 16:25:43 +0100 Original-Received: from localhost ([::1]:34217 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TvrLK-0000IX-Fq for geb-bug-gnu-emacs@m.gmane.org; Thu, 17 Jan 2013 10:25:26 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:55260) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TvrLG-0000H3-Hj for bug-gnu-emacs@gnu.org; Thu, 17 Jan 2013 10:25:24 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TvrLF-00079c-Bd for bug-gnu-emacs@gnu.org; Thu, 17 Jan 2013 10:25:22 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:59887) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TvrLF-00079Y-8v for bug-gnu-emacs@gnu.org; Thu, 17 Jan 2013 10:25:21 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1TvrLu-0003n2-Di for bug-gnu-emacs@gnu.org; Thu, 17 Jan 2013 10:26:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Agustin Martin Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 17 Jan 2013 15:26:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 13460 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.135843631314512 (code B ref -1); Thu, 17 Jan 2013 15:26:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 17 Jan 2013 15:25:13 +0000 Original-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 Original-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 Original-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 Original-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 Original-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 Original-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 Original-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 Original-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 Original-Received: by agmartin.aq.upm.es (Postfix, from userid 1000) id 418191FE9C; Thu, 17 Jan 2013 16:24:16 +0100 (CET) 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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:69919 Archived-At: 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