I have just been provisioning a brand new Linux computer.  Well, it's 
fairly old, some 10 years, but I've supplied it with a large external SSD 
drive to supersede its 5400 RPM old hard drive. This change has made the 
computer fairly snappy.  I've done this before, so I could use it as a 
backup machine if my main laptop needs to be out of service.  That happened 
once before and I was even able to continue getting my email on the Linux 
machine using Thunderbird.

This new distro is EndeavourOS. I created a venv, cloned the Leo git repo 
onto it, and got everything running. As has often happened on Linux 
systems, I got startup messages about missing spellcheck libraries.  On 
other VMs, these messages didn't denote any spellcheck problem.  Spellcheck 
still worked.  One of the messages was to install pyenchant, not enchant. 
pyenchant was in fact already installed.

The spell check tab in the log frame was there but the spell checker died 
as soon as I tried to spell check a node.  After some digging around and 
debugging I have tracked down the problem and found a solution. I'm not 
sure how this information should be captured and used by anyone else, but 
here's what I learned.

First of all, the reason there can be several warning messages about 
different spell check libraries is that pyenchant (or maybe it's the 
underlying enchant) check for the presence of at least on out of as many as 
five different spell check libraries that might be present. It can use any 
one of them but for some reason emits error messages for each one it fails 
to find even if it will actually work with the one it did find. 

Among them are ASpell and Hunspell. ASpell might be the most familiar.  
When Leo starts, the it tries to create a spell check dictionary using 
whichever of the spellers that pyenchant has found; the choice is not made 
by Leo but happens behind the scene.   If it can't make the dictionary 
after trying several ways it emits the message I saw about needing to 
install pyenchant not enchant. This message was wrong and misleading in my 
case and probably in many others.

The real situation turned out to be that the OS had installed ASpell and 
Hunspell (at least, I didn't check any others) but had not actually 
installed any word dictionaries.  Not only that but the name of the 
dictionary that Leo uses only fits Hunspell; ASpell uses a different naming 
convention.

Using the OS's package manager to install the Hunspell US English 
dictionary solved the problem.

I haven't seen this happen on other Linux VMs I've built so either they did 
install these dictionaries or I never used the spell checker with them. I 
don't know how Leo figures out the right dictionary name to use for other 
languages, but someone will reply here with that knowledge I'm sure.

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/872deb72-4b61-4193-93e8-7490fb4b56a4n%40googlegroups.com.

Reply via email to