all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: esbati@gmx.de
Cc: 20495-done@debbugs.gnu.org
Subject: bug#20495: 24.5; invoking Hunspell with multiple dicts
Date: Sat, 22 Aug 2015 17:29:19 +0300	[thread overview]
Message-ID: <83egiviegw.fsf@gnu.org> (raw)
In-Reply-To: <838ud5tqkx.fsf@gnu.org>

> Date: Sun, 03 May 2015 22:21:18 +0300
> From: Eli Zaretskii <eliz@gnu.org>
> Cc: 20495@debbugs.gnu.org
> 
> > From: Arash Esbati <esbati@gmx.de>
> > Date: Sun, 03 May 2015 10:11:17 +0200
> > 
> > Eli kindly explained to me here
> > <http://thread.gmane.org/gmane.emacs.help/104130> that Hunspell does not
> > support multiple languages, but it looks like a bug in `ispell.el'.
> 
> Actually, I see that I was mistaken: the code does try to load each
> dictionary in turn with its affix file.  Nevertheless, I'm quite sure
> such a combination misfired for me at some point; perhaps there's a
> bug, or maybe ispell.el is the culprit, since it doesn't currently
> support this mode (AFAIK).
> 
> In any case, the reaction of ispell.el in this case needs to be
> improved.

I've now modified ispell.el to support invocation of Hunspell with
multiple dictionaries.  To see how it work, you will need to invoke an
additional command ispell-hunspell-add-multi-dic, before you attempt
to change the ispell dictionary to the form DICT1,DICT2,...  This is
because ispell.el relies heavily on the assumption that any dictionary
admissible as argument to ispell-change-dictionary must be mentioned
in ispell-dictionary-alist or ispell-local-dictionary-alist.  Since
it's impractical to add to ispell-dictionary-alist all the possible
combinations of all the installed dictionaries, I instead provided a
command to do that manually on the need-to basis.

Note that the argument to both ispell-change-dictionary and
ispell-hunspell-add-multi-dic _must_ be in the form of a list of
_existing_ dictionary names (or their aliases) separated by a comma.
That is, you cannot use something like "deutsch8+american", but should
use "de_DE,en_US" instead.

Initial testing indicates that using this feature works for
spell-checking text written in different languages, although the list
of the proposed corrections are sometimes incomplete.  But I think
this is due to some problems in Hunspell itself, not in Emacs.

I'm closing this bug.  Feel free to reopen if there are left-overs, or
file a new bug about whatever problems you still see.





      reply	other threads:[~2015-08-22 14:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-03  8:11 bug#20495: 24.5; invoking Hunspell with multiple dicts Arash Esbati
2015-05-03 19:21 ` Eli Zaretskii
2015-08-22 14:29   ` Eli Zaretskii [this message]

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=83egiviegw.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=20495-done@debbugs.gnu.org \
    --cc=esbati@gmx.de \
    /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.