From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#17742: Acknowledgement (Support for enchant?) Date: Tue, 13 Dec 2016 18:37:12 +0200 Message-ID: <83bmwfbxaf.fsf@gnu.org> References: <834m2hjbmr.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1481647096 2167 195.159.176.226 (13 Dec 2016 16:38:16 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 13 Dec 2016 16:38:16 +0000 (UTC) Cc: 17742@debbugs.gnu.org To: Reuben Thomas Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Dec 13 17:38:12 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cGq5i-0008GU-1N for geb-bug-gnu-emacs@m.gmane.org; Tue, 13 Dec 2016 17:38:10 +0100 Original-Received: from localhost ([::1]:39315 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cGq5m-0005YQ-9p for geb-bug-gnu-emacs@m.gmane.org; Tue, 13 Dec 2016 11:38:14 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35310) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cGq5g-0005YL-2n for bug-gnu-emacs@gnu.org; Tue, 13 Dec 2016 11:38:09 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cGq5a-0006w6-JU for bug-gnu-emacs@gnu.org; Tue, 13 Dec 2016 11:38:08 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:53764) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cGq5a-0006w0-GU for bug-gnu-emacs@gnu.org; Tue, 13 Dec 2016 11:38:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cGq5a-0000gB-8b for bug-gnu-emacs@gnu.org; Tue, 13 Dec 2016 11:38:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 13 Dec 2016 16:38:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17742 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 17742-submit@debbugs.gnu.org id=B17742.14816470522575 (code B ref 17742); Tue, 13 Dec 2016 16:38:02 +0000 Original-Received: (at 17742) by debbugs.gnu.org; 13 Dec 2016 16:37:32 +0000 Original-Received: from localhost ([127.0.0.1]:40930 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cGq56-0000fT-F7 for submit@debbugs.gnu.org; Tue, 13 Dec 2016 11:37:32 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:44226) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cGq55-0000fH-Dr for 17742@debbugs.gnu.org; Tue, 13 Dec 2016 11:37:31 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cGq4x-0006lW-Bj for 17742@debbugs.gnu.org; Tue, 13 Dec 2016 11:37:26 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:47213) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cGq4x-0006lR-8D; Tue, 13 Dec 2016 11:37:23 -0500 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2241 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1cGq4w-00029B-EG; Tue, 13 Dec 2016 11:37:23 -0500 In-reply-to: (message from Reuben Thomas on Tue, 13 Dec 2016 00:53:47 +0000) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.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" Xref: news.gmane.org gmane.emacs.bugs:126990 Archived-At: > From: Reuben Thomas > Date: Tue, 13 Dec 2016 00:53:47 +0000 > Cc: 17742@debbugs.gnu.org > > Thanks. Note that this should not only list the installed > dictionaries, but also deduce the suitable values of CASECHARS and > NOT-CASECHARS for each dictionary. > > ​Thanks for the tip. > > ​In fact, it proves to be impossible to deduce suitable values currently, so I set defaults. Enchant will need > changes to support this (unless one finds the provider for each dictionary and uses ispell.el's existing > back-end-specific code, but this is a nasty solution). This simple solution gets the correct encoding at least > (Enchant is always utf8), and hence fixes the misalignment errors. > [...] > +(defun ispell-find-enchant-dictionaries () > + "Find Enchant's dictionaries, and record in `ispell-enchant-dictionary-alist'." > + (let* ((dictionaries > + (split-string > + (with-temp-buffer > + (ispell-call-process ispell-program-name nil t nil "-D") > + (buffer-string)))) > + (found > + (mapcar #'(lambda (lang) > + `(,lang "[[:alpha:]]" "[^[:alpha:]]" "['.’-]" t nil nil utf-8)) > + dictionaries))) I'm sorry, I don't think this is good enough for any language but English. I looked at a few Hunspell dictionaries I have, and almost all of them have some non-[:alpha:] characters in what becomes CASECHARS when ispell.el sets up itself for that dictionary. So this seems to be really important for correct spell-checking of almost any language. Moreover, these settings must be in sync with the words in the dictionary, so it isn't just some general setting determined by the dictionary's language, it must come from the dictionary or its authors. I understand that Enchant doesn't yet support these features, but in that case we must provide our users with some way of customizing these settings, we cannot silently use defaults that are most probably inappropriate, even if they are 90% correct. Do the dictionaries used by Enchant really fail to provide this information? Aren't they Aspell dictionaries or similar?