[PATCH] Allow removing words from the personal dictionary, that weren't previously added

Stephan Witt st.witt at gmx.net
Mon Nov 21 17:53:55 UTC 2022


Am 20.11.2022 um 12:40 schrieb Jürgen Spitzmüller <jspitzm at gmail.com>:
> 
> Am Sonntag, dem 20.11.2022 um 12:34 +0100 schrieb Stephan Witt:
>> Yes, it never worked before.
>> 
>> If unlearnWord is called it has an effect for learned words only.
>> 
>> There is no call interface to unlearn a word in main dictionary.
> 
> I see. But wouldn't it be possible to use an exception list here, too?

Not easy, this would require to rewrite the spell check chunk split algorithm.

ATM the complete paragraph is passed to the Apple spell checker at once.
Obviously it won’t mark the unlearned word as misspelled in this case.
So LyX has to iterate in a 2nd pass over the paragraph and find the unlearned words.
I’d rather suggest the person who wants that to switch to the Hunspell engine.

>> Yes, this probably is an effect of the handling of the spell checker
>> result in LyXs hunspell interface implementation.
>> 
>> The solution would be to add and use more SpellChecker::Result values
>> in HunspellChecker::check() to get the option to differentiate here.
> 
> Should be done. As it is now, it is more confusing than helpful. The
> difference between OK and LEARNED does indicate this very difference,
> doesn't it?

Yes, but I’d propose to add more values. 
At least UNLEARNED for exclude list and IGNORED for NO_SPELLCHECK font.

>>>> 2. There is no context menu option to revert the
>>>> LFUN_FONT_NO_SPELLCHECK. 
>>>> One may use the font options dialog - but opening it resets the
>>>> NO_SPELLCHECK from word immediately.
>>> 
>>> There is: "Ignore This Occurrence". It shows when opening the
>>> context
>>> menu upon a misspelled word. This triggers the LFUN.
>> 
>> Yes, but the „Unignore“ option is not in drop-down menu.
> 
> What do you mean by "drop-down" menu? It is in the context menu and in
> the spell checker dialog.

Sorry - I meant the context menu.

>> The font options dialog resets NO_SPELLCHECK on open.
> 
> Not here.

Here it is missing because of the spellcheck of the marked word returns OK.
With the enum expansion mentioned above it would be possible to handle that.

I don’t understand why we have different behavior here… see screen shots below.

Stephan

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20221121/dbce6d8a/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Bildschirmfoto 2022-11-21 um 18.52.24.png
Type: image/png
Size: 130296 bytes
Desc: not available
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20221121/dbce6d8a/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Bildschirmfoto 2022-11-21 um 18.52.52.png
Type: image/png
Size: 137847 bytes
Desc: not available
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20221121/dbce6d8a/attachment-0003.png>


More information about the lyx-devel mailing list