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

Jürgen Spitzmüller jspitzm at gmail.com
Sun Nov 20 11:01:48 UTC 2022


Am Mittwoch, dem 16.11.2022 um 07:55 +0100 schrieb Stephan Witt:
> I’ve made two patches on top of Isaacs patch to make it work again on
> Mac. 
> See attached patches. 1st one is the patch from Isaac, 2nd and 3rd
> are mine.

Thanks!

> 1. There are code paths with SpellChecker::WORD_OK with WordLangTuple
> not being assigned anywhere. 
> IMO a check for it is required to avoid a crash when using the lang
> pointer later.

Shouldn't you rather (or additionally) check for !wl.lang()? Or is it
clear that !wl.word.empty() means we have a lang() pointer?

> 2. Spell checkers in paragraph check mode (Apple) aren’t using the
> exclude word list at all.
> IMO it's the right thing to skip the option to add words to the
> exclude word list then.

But don't you disable the removal from Apple's personal dictionary
(AppleSpellChecker::remove) with this as well? Didn't this work before
the patch?

> Please test and give feedback for it…
> 
> I’ve noticed two additional problems while testing:
> 
> 1. The new feature with exclude word lists doesn’t work for me with
> Hunspell. 
> But this may be a defect of my private hunspell framework.

It works for me with Hunspell (note that the lists are only saved upon
LyX closure).

What I find odd, though, is the naming in the menu. When I click on a
word that is in the main dictionary, e.g. "table", it offers me to
"Remove from personal dictionary". But this is wrong. It doesn't remove
it from any dictionary, but adds it on personal exclusion list. So the
menu entry here should read "Treat this word as incorrect".

Likewise, if I "un-ignore" such a word, the menu offers me to "Add to
personal dictionary". This is wrong as well. Should read
"Don't treat this word as incorrect".

> 
> 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.

> 
> BR, Stephan
> 
> 

-- 
Jürgen


More information about the lyx-devel mailing list