bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#13460: Issue to change dictionary when using hunspell on emacs


From: Agustin Martin
Subject: bug#13460: Issue to change dictionary when using hunspell on emacs
Date: Thu, 17 Jan 2013 16:24:16 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

On Thu, Jan 17, 2013 at 01:26:31PM +0100, Agustin Martin wrote:
> On Thu, Jan 17, 2013 at 01:37:30AM -0500, Glenn Morris wrote:
> > Eli Zaretskii wrote:
> > 
> > >> From: Glenn Morris <rgm@gnu.org>
> > >> Cc: Jochen Schmitt <Jochen@herr-schmitt.de>,  13460@debbugs.gnu.org
> > >> Date: Wed, 16 Jan 2013 18:23:23 -0500
> > >> 
> > >> Eli Zaretskii wrote:
> > >> 
> > >> > You need to install the English dictionary for Hunspell.  I suspect
> > >> > that its name will be en_US (or maybe en_GB), not "english".
> > >> 
> > >> M-x ispell-change-dictionary doesn't accept "en_US" as input.
> > >> It wants something like "english" (coming from
> > >> ispell-dictionary-base-alist), which as you say is wrong.
> > >
> > > Then one needs to customize ispell-local-dictionary-alist to include
> > > the setting for en_US.  Here's what I have there:
> > >
> > >      '("en_US"
> > >   "[[:alpha:]]"
> > >   "[^[:alpha:]]"
> > >   "[']" nil ("-r") nil utf-8)
> > >
> > > The OP may wish to omit the -r switch, it's not a necessity.
> > >
> > > Also, be sure to look at en_US.aff and match the character set it
> > > mentions there with the "utf-8" part above.
> > 
> > IMO it should work out of the box.
> > Ie ispell-set-spellchecker-params should handle hunspell as it currently
> > does aspell, which has its own ispell-find-aspell-dictionaries func.
> 
> The problem is that hunspell -D does not return control. A bug has been
> opened for this, together with patch suggested by Eli Zaretskii,
> 
> http://sourceforge.net/tracker/?func=detail&aid=3522524&group_id=143754&atid=756395
> 
> A workaround was proposed (redirecting from /dev/null), but it seems too
> UNIX biassed.

There is a second issue I forgot, one needs to get info from the installed
.aff files, so all them must be completely opened to look for that info
(OTHERCHARS and friends) and I'd expect that to slow Emacs init a bit. Since
I did not try to write preliminary code for that parsing I cannot evaluate
that delay. Fortunately aspell used small .dat files for that purpose.

-- 
Agustin





reply via email to

[Prev in Thread] Current Thread [Next in Thread]