From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#19229: ispell on Windows Date: Fri, 22 May 2015 09:53:10 +0300 Message-ID: <83fv6p5cix.fsf@gnu.org> References: <831tib6omo.fsf@gnu.org> <83zj4y649d.fsf@gnu.org> <83r3q96gt4.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1432277666 22981 80.91.229.3 (22 May 2015 06:54:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 22 May 2015 06:54:26 +0000 (UTC) Cc: 19229@debbugs.gnu.org To: Alan Third Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri May 22 08:54:14 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YvgqS-0006OJ-TH for geb-bug-gnu-emacs@m.gmane.org; Fri, 22 May 2015 08:54:13 +0200 Original-Received: from localhost ([::1]:60546 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YvgqR-0007RD-VD for geb-bug-gnu-emacs@m.gmane.org; Fri, 22 May 2015 02:54:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53903) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YvgqO-0007R8-5i for bug-gnu-emacs@gnu.org; Fri, 22 May 2015 02:54:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YvgqJ-0006qO-2r for bug-gnu-emacs@gnu.org; Fri, 22 May 2015 02:54:08 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:42553) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YvgqI-0006qK-VA for bug-gnu-emacs@gnu.org; Fri, 22 May 2015 02:54:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1YvgqI-000573-IL for bug-gnu-emacs@gnu.org; Fri, 22 May 2015 02:54:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 22 May 2015 06:54:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19229 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 19229-submit@debbugs.gnu.org id=B19229.143227760819613 (code B ref 19229); Fri, 22 May 2015 06:54:02 +0000 Original-Received: (at 19229) by debbugs.gnu.org; 22 May 2015 06:53:28 +0000 Original-Received: from localhost ([127.0.0.1]:52528 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Yvgpj-00056F-GP for submit@debbugs.gnu.org; Fri, 22 May 2015 02:53:28 -0400 Original-Received: from mtaout21.012.net.il ([80.179.55.169]:43727) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Yvgpb-00055p-99 for 19229@debbugs.gnu.org; Fri, 22 May 2015 02:53:26 -0400 Original-Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0NOQ00J00NSVK900@a-mtaout21.012.net.il> for 19229@debbugs.gnu.org; Fri, 22 May 2015 09:53:12 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NOQ00JW2OGNHD80@a-mtaout21.012.net.il>; Fri, 22 May 2015 09:53:12 +0300 (IDT) In-reply-to: X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 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:103013 Archived-At: > Date: Thu, 21 May 2015 21:19:19 +0100 > From: Alan Third > Cc: 19229@debbugs.gnu.org > > On 21 May 2015 at 17:23, Eli Zaretskii wrote: > >> Date: Thu, 21 May 2015 09:16:00 +0100 > >> From: Alan Third > >> Cc: 19229@debbugs.gnu.org > >> > >> This works in windows! Once this is done I can then use > >> ispell-change-dictionary to change the dictionary to anything I want. > >> Presumably, then, the problem I'm seeing is that ispell+hunspell falls > >> over if the dictionary initially set by emacs doesn't exist. > > OK, I was completely wrong here. In what way? > >> Is there a way to force ispell+hunspell to use a different dictionary > >> from the start other than changing the LANG variable? > > > > There are several ways of doing that. > > > > First, you can customize the variable ispell-dictionary to name the > > dictionary (without the .aff or .dic extensions, just the stem of the > > basename, as in "en_GB"). You can set this in your ~/.emacs. This > > will cause ispell.el to invoke Hunspell with the appropriate -d > > command-line option. > > This doesn't work. I've done some digging in ispell.el and I think I > know what's going on. > > The function ispell-find-hunspell-dictionaries parses the output of > `hunspell -D` looking for *hunspell's* default dictionary. If you > don't have any of the variables you mentioned set then hunspell > doesn't give a default. What does your Hunspell say when you invoke it with -D? Mine says this: SEARCH PATH: .;;C:\Hunspell\;D:\usr\eli\.openoffice.org\3\user\wordbook;D:\usr\bin\..\share\hunspell;C:\Program files\OpenOffice.org 2.4\share\dict\ooo\;C:\Program files\OpenOffice.org 2.3\share\dict\ooo\;C:\Program files\OpenOffice.org 2.2\share\dict\ooo\;C:\Program files\OpenOffice.org 2.1\share\dict\ooo\;C:\Program files\OpenOffice.org 2.0\share\dict\ooo\ AVAILABLE DICTIONARIES (path is not mandatory for -d option): D:\usr\bin\..\share\hunspell\american D:\usr\bin\..\share\hunspell\default D:\usr\bin\..\share\hunspell\de_AT D:\usr\bin\..\share\hunspell\de_CH D:\usr\bin\..\share\hunspell\de_DE D:\usr\bin\..\share\hunspell\de_DE_frami D:\usr\bin\..\share\hunspell\ENU D:\usr\bin\..\share\hunspell\en_GB D:\usr\bin\..\share\hunspell\en_MED D:\usr\bin\..\share\hunspell\en_US D:\usr\bin\..\share\hunspell\he_IL D:\usr\bin\..\share\hunspell\russian D:\usr\bin\..\share\hunspell\ru_RU D:\usr\bin\..\share\hunspell\sv_SE LOADED DICTIONARY: D:\usr\bin\..\share\hunspell\default.aff D:\usr\bin\..\share\hunspell\default.dic Hunspell 1.3.2 Note that the default dictionary it loaded, as announced near the end. Once again, I ask where you got your Hunspell binary. In the binary distribution here: http://sourceforge.net/projects/ezwinports/files/hunspell-1.3.2-3-w32-bin.zip/download which is what I use, there's the "default" dictionary, in the form of 2 files: default.dic and default.aff. Do you have them in your share/hunspell/ directory? If not, just copy your "usual" dictionary files into those names (or toss your Hunspell installation and use mine instead ;-). > Specifically, it looks for a line that ends ".aff" then uses that line > in an argument for ispell-parse-hunspell-affix-file, which fails if > it's nil, which in my case it is. Because that function errors, > ispell-find-hunspell-dictionaries stops processing and therefore never > builds ispell-hunspell-dictionary-alist, which seems to be a pretty > vital variable. > > While that doesn't seem like very good behaviour to me, I don't know > if you'd classify it as a bug. I see no bug here. It works for me. I think your Hunspell installation is misconfigured, that's all.