Am 03.05.2011 um 20:23 schrieb Pavel Sanda:

> hi all,
> 
> i have a question for people on various linux distros.  does hunspell
> dictionaries and thesaurus working on your box automatically? (now i mean
> vanilla lyx, not packages already fixed by distro packagers).
> 
> i just found that both spelling and also thesaurus dictionaries are
> not found automatically and the reason is that in contrast to
> aspell we are trying to use new idiom 
> 
> lyx::support::package().system_support().absFileName(),dataDirectory()
> 
> for path which usually leads to something like /usr/share/lyx/ +dicts/.
> this looks completely wrong, since there is no reason to expect that
> we find hunspell dictionaries inside lyx dicrectory.
> 
> is there some reason why to use system_support()? we should use some at least
> probable location. also the code written above makes it difficult for package
> maintainers to make simple patch for their distros because instead of changing
> one string either by ./configure --set-dictionaries or at least in source,
> they need to rewrite the code to get rid of 'lyx/' in path.

At the time I stepped in and added this dataDirectory relative to lyx's system
and user directories there was only one path for hunspell available: the one
in preferences. This one now is the first one visited. The idea to add the
other paths was to incorporate some dictionary download into LyX - but it
didn't happen - I couldn't afford the development of such a feature.
The files to download should be placed in the user directory of LyX.

For Linux this is questionable anyway when there is a way to install them
with the distros installers system wide. But not all users are able to
change there system - I've heard of such stories in the past, on Linux too.

So now it is useful for Windows and Mac packages, they distribute the
dictionaries exactly there - bundled within LyX. Of course - like I did
it for aspell - one easily can extend the lookup for the hunspell dictionaries
and add another location to search for, a configure option is a good idea to
make it easy to change for the linux packagers.

And the linux user too is able to enter the path in the LyX preferences.

> where are spellcheck and thesaurus dictionaries on your distros? 
> (/usr/share/myspell on gentoo)
> 
> thesaurus currently doesn't now issue even any warning from debug::files
> level when no path is set in prefs and dictionary is not found.
> 
> the hunspell debug code outputs pointers instead of language and similar,
> so fun to debug :)

Sorry, I think this must be was a side effect of some change - at first the 
debug
output had path names...

Stephan

Reply via email to