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: Fri, 18 Jan 2013 18:05:01 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

On Thu, Jan 17, 2013 at 08:30:29PM +0100, Agustin Martin wrote:
> From: Jochen Schmitt
> > 
> > I have try to create a suggestion for a general solution for
> > this issue in the next release of emacs.
> > 
> > I have attached a patch on this mail which introduced a alist to
> > translate the dictionary names like 'english' in the form which will
> > be accepted by hunspell.
> > 
> > I have done a first short test to check out, that this is a
> > working solution.
> >  
> > Of course the ispell-hunspell-dictionary-alist need extension because 
> > I have put only two entries to be able to check out my solution.
> 
> Hi Jochen. Thanks a lot for your feedback (and to Glenn for forwarding it),
> you can send your followups to the bug address.
> 
> I remember to have done some initial work with an alias file for hunspell,
> but I do not find that now.
> 
> I'd keep the name `ispell-hunspell-dictionary-alist' for the alist of
> actually found dicts, once implemented in one way or another. I vaguely
> remember using something like `ispell-hunspell-dictionary-equivs-alist' for
> the purpose of having a list of equivalences. I'd also not hardcode nil to
> "en_GB".
> 
> For the rest I think it can be useful as a temporary workaround, but I'd
> prefer to see these changes in a sanitized dictionary alist for hunspell,
> something similar to what is done in `ispell-set-spellchecker-params' to use
> [:alpha:] when possible, but for this purpose and limited to the original
> base alist. Otherwise will only work for entries not using explicit "-d"
> and may hide personal choices in ~/.emacs pointing to non-standard locations
> (e.g., "american" using "~/personal/en_US". (Looked quickly, may be I missed
> something)
> 
> Let me try to find where I have my previous work and what is harder, try to
> find the time. This should not be that time consuming, so I expect to look
> at this shortly.

I have been playing with this. Please see attached patch for current status.
There are a couple of minor things I would like to think about first.

Current changes explicitly set "english" to one of the two main choices
("en_GB"). This  is not something I like very much and I am aware that
people is sensitive about this. I'd prefer to associate it with plain "en",
but hunspell has some pending issues regarding fallback values.

Since there should be mapppings for all (but nil) default dict definitions, 
and this is only done for those dicts I am also considering to show an error
if an expected mappping is not found, but this is a really minor internal
issue just to help finding missing mappings early.

I will test these changes a bit more and if no problems appear will commit
early next week. Feedback is welcome.

Thanks again for your suggestions.

-- 
Agustin

Attachment: ispell.el_hunspell-default-dict-names-mapping.diff
Description: Text Data


reply via email to

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