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 13:26:31 +0100 Message-ID: <20130117122631.GA5097@agmartin.aq.upm.es> References: <20130116122509.GA2209@omega.in.herr-schmitt.de> <83hamh80ry.fsf@gnu.org> <838v7s8o26.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1358425653 28435 80.91.229.3 (17 Jan 2013 12:27:33 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 17 Jan 2013 12:27:33 +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 13:27:51 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 1TvoZO-0006Hg-HM for geb-bug-gnu-emacs@m.gmane.org; Thu, 17 Jan 2013 13:27:46 +0100 Original-Received: from localhost ([::1]:50634 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TvoZ7-0003pO-Uc for geb-bug-gnu-emacs@m.gmane.org; Thu, 17 Jan 2013 07:27:29 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:36110) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TvoZ0-0003oH-Q4 for bug-gnu-emacs@gnu.org; Thu, 17 Jan 2013 07:27:28 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TvoYz-0001qv-FY for bug-gnu-emacs@gnu.org; Thu, 17 Jan 2013 07:27:22 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:59083) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TvoYz-0001qr-CB for bug-gnu-emacs@gnu.org; Thu, 17 Jan 2013 07:27:21 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1TvoZd-0007FN-LF for bug-gnu-emacs@gnu.org; Thu, 17 Jan 2013 07:28:01 -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 12:28:01 +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.135842565727823 (code B ref -1); Thu, 17 Jan 2013 12:28:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 17 Jan 2013 12:27:37 +0000 Original-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 Original-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 Original-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 Original-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 Original-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 Original-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 Original-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 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/edison-001) with ESMTP id r0HCQWfh029484; Thu, 17 Jan 2013 13:26:32 +0100 Original-Received: by agmartin.aq.upm.es (Postfix, from userid 1000) id DA65F449; Thu, 17 Jan 2013 13:26:31 +0100 (CET) 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-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:69914 Archived-At: 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