[Dict-common-dev] debian ispell.el: adding a new dictionary for aspell

Agustin Martin Domingo agustin.martin@hispalinux.es
Mon, 15 Mar 2004 13:49:43 +0100


Nick Patavalis wrote:
> 
> Can you clarify a bit on that, or provide some pointers to existing
> documentation? What do you mean "register themselves". What mechanism
> is used for that. As far as I understand, "ispell.el" has a dictionary
> alist specifying---among other things like valid word-characters and
> so on---what options to pass to the "ispell" or "aspell" command (-d
> greek) in order to select the requested dictionary. How can a dict
> register itself?
> 

ispell-dictionary-alist is voided in Debian and refill after data 
provided by dictionaries package maintainers. We added a hook in 
ispell.el to define some functions and load the contents of 
/var/cache/dictionaries-common/emacsen-ispell-dicts.el reflecting all 
the really installed dictionaries. This is much more flexible and 
powerful, and put responsibility on ispell/aspell dictionary 
maintainers, who are supposed to know much more about the specific 
characteristics of the language. This also allows to add dictionaries 
without extra touching of ispell.el. Maintainers should sent the 
appropriate entries upstream if already not present in ispell.el, 
although they will not be used directly in Debian system.

> 
>>I think the way to go is aspell-el doing that. The info-aspell file 
>>would be something like the attached one (done after your patch, but 
>>that will of course need testing in a greek environment). I am not 
>>cc'ing aspell-el package since aspell-el maintainer reads this list. 
>>More info at
> 
> 
> Who reads this "info-aspell" file? How does it affect "ispell.el"?
> Does "ispell.el" consult a set of "info-aspell" files in order to
> build its dictionary alist? Where are these "info-aspell" files
> locate? Can you, please, explain a bit (or point to some code / doc)?
> 

Policy document at dictionaries common page

   http://dict-common.alioth.debian.org

The policy document

   http://dict-common.alioth.debian.org/dsdt-policy.html

See section (Registering aspell dictionaries for use from within emacs)

http://dict-common.alioth.debian.org/dsdt-policy.html#aspell-registration

For instance aspell-el.info aspell should be installed as 
/var/lib/dictionaries-common/aspell/aspell-el. It will be read at 
'/usr/sbin/update-dictcommon-aspell' call (The call I wrote in my 
previous message was wrong) from package postinst and 
/var/cache/dictionaries-common/emacsen-ispell-dicts.el regenerated from 
the entries found in that and similar entries for ispell and aspell 
dictionaries (it mixes both, it is not possible at that time to know if 
the user in the ~/.emacs file prefers aspell over ispell).

Cheers,

-- 
Agustin