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

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

bug#23097: 24.5; ispell.el: lines with both CASECHARS and NOT-CASECHARS


From: Nikolay Kudryavtsev
Subject: bug#23097: 24.5; ispell.el: lines with both CASECHARS and NOT-CASECHARS get sent to the spell checker
Date: Wed, 14 Oct 2020 22:20:08 +0300
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.12.1

The whole ispell-dictionary-alist structure implies that matching would be done word by word. And looking into the dictionary setup is the first thing ispell.el user would do. Apart from NOT-CASECHARS it also has this element:

OTHERCHARS is a regexp of characters in the NOT-CASECHARS set but which can be used to construct words in some special way.  If OTHERCHARS characters follow
and precede characters from CASECHARS, they are parsed as part of a word,
otherwise they become word-breaks...
Basically presence of both NOT-CASECHARS and OTHERCHARS implies that ispell.el does strict word by word matching. If we're just sending any line that contains a CASECHARS match, we don't really need either of them, since we can just match by CASECHARS alone and then send the line.

Oh, and there's another thing. Ispell.el actually does word by word search, but only on resume. Try my recipe again, just make the last line of spellchecked buffer to look like "doh kat". Then suspend the spellcheck after the first line and resume it with C-u M-$. You'd see that it skips the last line "doh" fine in this scenario. But then it suffers from the word mix problem described by Eli: spellchecking
dohkat" and "katdoh" results in kat alone being sent.

Thinking a bit more about this word mix problem, seems like it's not as simple to fix it as I thought in my previous letter, since we need some list of legitimate word separators for each language.

--
Best Regards,
Nikolay Kudryavtsev






reply via email to

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