all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Reuben Thomas <rrt@sc3d.org>
Cc: 17742@debbugs.gnu.org
Subject: bug#17742: Acknowledgement (Support for enchant?)
Date: Tue, 13 Dec 2016 18:37:12 +0200	[thread overview]
Message-ID: <83bmwfbxaf.fsf@gnu.org> (raw)
In-Reply-To: <CAOnWdoir0iDUS+DScFwh-7j_saL8aEt5dCutH2SQQijpWvMD3A@mail.gmail.com> (message from Reuben Thomas on Tue, 13 Dec 2016 00:53:47 +0000)

> From: Reuben Thomas <rrt@sc3d.org>
> 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?





  reply	other threads:[~2016-12-13 16:37 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-10  0:01 bug#17742: Support for enchant? Reuben Thomas
2014-09-15 11:06 ` bug#17742: Limitations of enchant Reuben Thomas
2016-12-02  0:15   ` Reuben Thomas
     [not found] ` <handler.17742.B.140235850213377.ack@debbugs.gnu.org>
2016-12-05 21:41   ` bug#17742: Acknowledgement (Support for enchant?) Reuben Thomas
2016-12-06 15:55     ` Eli Zaretskii
2016-12-06 15:56       ` Reuben Thomas
2016-12-13  0:53         ` Reuben Thomas
2016-12-13 16:37           ` Eli Zaretskii [this message]
2016-12-13 18:26             ` Reuben Thomas
2016-12-13 18:54               ` Eli Zaretskii
2016-12-13 21:17                 ` Reuben Thomas
2016-12-13 21:30                   ` Reuben Thomas
2016-12-14 15:42                   ` Eli Zaretskii
2016-12-15 12:36                     ` Reuben Thomas
2016-12-18 23:39                 ` Reuben Thomas
2016-12-19  1:02                   ` Reuben Thomas
2016-12-19 12:41                     ` Reuben Thomas
2016-12-19 16:01                   ` Eli Zaretskii
2016-12-19 17:37                     ` Agustin Martin
2016-12-19 18:09                       ` Eli Zaretskii
2016-12-19 21:21                         ` Reuben Thomas
2016-12-19 21:27                       ` Reuben Thomas
2016-12-20 15:38                         ` Eli Zaretskii
2016-12-19 21:47                     ` Reuben Thomas
2016-12-19 22:04                       ` Reuben Thomas
2016-12-20 15:40                         ` Eli Zaretskii
2016-12-20 15:40                       ` Eli Zaretskii
2016-12-20 21:43                         ` Reuben Thomas
2016-12-21 17:13                           ` Eli Zaretskii
2016-12-21 17:32                             ` Reuben Thomas
2017-08-09 11:35                               ` Reuben Thomas
2017-08-18  8:54                                 ` Eli Zaretskii
2017-08-20 13:02                                   ` Reuben Thomas
2017-08-20 14:42                                     ` Eli Zaretskii
2017-08-20 14:50                                       ` Reuben Thomas
2017-08-20 19:34                                         ` Eli Zaretskii
2017-08-20 20:36                                           ` Reuben Thomas
2017-08-20 14:50 ` bug#17742: Reuben Thomas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83bmwfbxaf.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=17742@debbugs.gnu.org \
    --cc=rrt@sc3d.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.