[LyX/master] Meet per-document spelling dictionaries (fixes #86 [sic!])
Stephan Witt
st.witt at gmx.net
Sun Mar 7 13:04:54 UTC 2021
Am 07.03.2021 um 13:54 schrieb Jürgen Spitzmüller <spitz at lyx.org>:
>
> Am Sonntag, dem 07.03.2021 um 13:45 +0100 schrieb Stephan Witt:
>> I see more than one problem.
>>
>> 1. The spell checker on Mac is an OS service and there is support for
>> document scope too. Probably this collides with our implementation in
>> LyX.
>
> Why is this a problem? The implementation I have done is OS-independent
> and should work on the Mac, too. AppleSpellChecker really does not
> strike me too different from the other spellers.
>
>> 2. Document local dictionary is only one option to improve the
>> situation.
>> Imagine documents for specific context - e.g. medical or chemical
>> science -
>> there it would be better to associate the document with a dedicated
>> personal
>> dictionary and/or even share it with colleagues.
>
> How does this relate to the problem we are just talking about? The
> feature request I addressed was about document local dictionaries,
> nothing else.
Yes, and I propose to do it in a more general way instead.
>> 3. IMO this wasn’t a bug fix - it’s an enhancement or a new feature.
>
> I can't follow you here. Sure it is.
IMO it is a new feature.
>>> Also, as you say it is marked correctly after context menu action,
>>> there is probably only some call missing here.
>>
>> Yes, probably.
>
> I have just looked again at AppleSpellChecker and really do not see how
> this is so special. Maybe you just need to debug a bit
> Paragraph::spellCheck() (the routine which is in if (speller-
>> canCheckParagraph())). Well likely just a simple oversight. Check for
> the return values of speller->check() gathered here. It should be
> LEARNED_WORD for the cases in question.
The difference is made by the canCheckParagraph() method of spellers.
Paragraph::spellCheck() has different code paths for it.
With paragraph check enabled - see AppleSpellChecker.h - the speller
sees the whole sentence as a word and marks one or more words as mis-spelled
at once.
Stephan
More information about the lyx-devel
mailing list