From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Ispell and unibyte characters Date: Thu, 29 Mar 2012 20:06:17 +0200 Message-ID: <83sjgr1duu.fsf@gnu.org> References: <83aa3f2hgh.fsf@gnu.org> <20120326173912.GA22306@agmartin.aq.upm.es> <20120328191821.GA6266@agmartin.aq.upm.es> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: dough.gmane.org 1333044275 5451 80.91.229.3 (29 Mar 2012 18:04:35 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 29 Mar 2012 18:04:35 +0000 (UTC) Cc: emacs-devel@gnu.org To: Agustin Martin Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Mar 29 20:04:32 2012 Return-path: Envelope-to: ged-emacs-devel@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 1SDJi4-0001d9-78 for ged-emacs-devel@m.gmane.org; Thu, 29 Mar 2012 20:04:32 +0200 Original-Received: from localhost ([::1]:34353 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SDJi3-0005jK-HW for ged-emacs-devel@m.gmane.org; Thu, 29 Mar 2012 14:04:31 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:48278) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SDJhv-0005hw-7o for emacs-devel@gnu.org; Thu, 29 Mar 2012 14:04:29 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SDJho-00060z-IV for emacs-devel@gnu.org; Thu, 29 Mar 2012 14:04:22 -0400 Original-Received: from mtaout23.012.net.il ([80.179.55.175]:54588) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SDJho-00060h-9l for emacs-devel@gnu.org; Thu, 29 Mar 2012 14:04:16 -0400 Original-Received: from conversion-daemon.a-mtaout23.012.net.il by a-mtaout23.012.net.il (HyperSendmail v2007.08) id <0M1N00M00R9FT800@a-mtaout23.012.net.il> for emacs-devel@gnu.org; Thu, 29 Mar 2012 20:04:14 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([84.229.231.234]) by a-mtaout23.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0M1N00MMYRJ1TF10@a-mtaout23.012.net.il>; Thu, 29 Mar 2012 20:04:13 +0200 (IST) In-reply-to: <20120328191821.GA6266@agmartin.aq.upm.es> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) X-Received-From: 80.179.55.175 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:149245 Archived-At: > Date: Wed, 28 Mar 2012 21:18:21 +0200 > From: Agustin Martin > > > OTHERCHARS are not very important anyway, at least for languages I'm > > interested in. > > > > > Since currently it is not possible to ask hunspell for installed > > > dictionaries (hunspell -D does not return control to the console) > > > no one tried something similar for hunspell. > > > > In what version do you have problems with -D? > > Hunspell 1.3.2. Does not return control until I press ^C. This may be useful > if someone wants to know about installed hunspell dictionaries and prepare > something to play with that info, in a way similar to what is currently done > for aspell in ispell.el. Well, to be fair to the Hunspell developers, the documentation doesn't say that -D should exit after displaying the available dictionaries. And the code really doesn't do that. However, with a simple 2-liner (below) I can make it do what you want. > > Since I wrote that, I found that the problem was due to a bug in > > hunspell (which I fixed in my copy): it reported byte offsets of the > > misspelled words, rather than character offsets. After fixing that > > bug, there's no issue here anymore and nothing to fix in ispell.el. > > There's a bug report with a patch about that in the hunspell bug > > tracker, so there's reason to believe this bug will be fixed in a > > future release. > > You mean > > http://sourceforge.net/tracker/?func=detail&aid=3178449&group_id=143754&atid=756395 Yes. > I filed that bug one year ago and received no reply from hunspell > maintainers. This year I received a followup with a proposed change, but > there is still no reply to it. I simply fixed this. This _is_ Free Software, isn't it? > There is other problem that mostly hits re-using ispell default entries > under hunspell > > http://sourceforge.net/tracker/?func=detail&aid=2617130&group_id=143754&atid=756395 > > [~ prefixed strings are treated as words in pipe mode] Another easy fix (the feature is not implemented, so the code should simply ignore such lines). > that now stands for three years. I have waited in the hope this is fixed, It's true that development seems to be slow, but then aspell development is not exactly vibrant, either: both spellers hadn't a release in many months. Anyway, to me, Hunspell is a better tool, because of its support for multiple dictionaries, which fixes the most annoying inconvenience in Emacs spell-checking: the need to switch dictionaries according to the language -- this is really a bad thing when you use Flyspell. With multiple dictionaries, with very rare exceptions, one needs a single entry in ispell-dictionary-alist, having all of the dictionaries for languages one normally uses, [[:alpha:]] as CASECHARS, and UTF-8 as the encoding. > but I think I will soon commit to Emacs the same change I use for Debian, > making sure extended-character-mode is nil for hunspell. Probably a good idea. --- src/tools/hunspell.cxx~0 2011-01-21 19:01:29.000000000 +0200 +++ src/tools/hunspell.cxx 2012-03-21 16:40:31.255690500 +0200 @@ -1756,6 +1763,7 @@ int main(int argc, char** argv) fprintf(stderr, gettext("SEARCH PATH:\n%s\n"), path); fprintf(stderr, gettext("AVAILABLE DICTIONARIES (path is not mandatory for -d option):\n")); search(path, NULL, NULL); + if (arg_files==-1) exit(0); } if (!privdicname) privdicname = mystrdup(getenv("WORDLIST"));