[Top][All Lists]

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

Re: Bug 130397

From: Peter Heslin
Subject: Re: Bug 130397
Date: Sat, 8 Jan 2005 22:39:57 +0000 (UTC)
User-agent: slrn/ (Linux)

On 2005-01-08, Geoff Kuenning <address@hidden> wrote:
>  For identical, superset, or overlapping alphabets, the problem is
>  basically insoluable.  For example, "fra" is a misspelling in
>  English but legal in Italian.  If it appears in a mixed passage,
>  which dictionary should it be fed to?  The only solution would seem
>  to be to require the user to mark passages in some way, as is done
>  in HTML.

I have some code, which works with flyspell, that parses the buffer
around point, and sets a text-property to indicate the current
language.  In LaTeX buffers this is done by examining Babel commands
that declare the language; in XML buffers it is done by examining the
xml:lang attributes.

This only works with flyspell, not ispell.el, because flyspell
conveniently provides a hook for a function that gets called whenever
a word is spell-checked.  My function looks at the relevant
text-property and the value of ispell-local-dictionary, and if they
don't match, it starts a new ispell/aspell process with the correct
dictionary for the current text.

It would be great if ispell.el itself checked a text-property like
this to indicate the language, so that code like mine could work with
both flyspell and ispell.  Even better would be if ispell.el could be
configured to keep multiple ispell/aspell processes running: one for
each language.  The speed bottleneck in my code is that when you move
point from a part of the buffer in one language to a part in another
language, I have to kill the old ispell/aspell process and start up a
new one.  This causes a noticeable delay when moving the cursor.

It would be awesome if, for a buffer with text in two languages, you
could keep an ispell/aspell process running for each.  I suppose its
mainly in flyspell that you would see the speed benefit, though.


reply via email to

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