Subject: Re: bug#24439: ispell.el; cutom setting `ispell-library-directory'; patch

From: Eli Zaretskii <[email-masked]>
Date: Thu, 15 Sep 2016 20:20:46 +0300

> Cc: [email-masked]
> From: Laimonas Vėbra <[email-masked]>
> Date: Thu, 15 Sep 2016 19:51:37 +0300
> 
> Eli Zaretskii wrote:
> 
>  > What I meant specifically is to use the -d switch to tell ispell where
>  > to look for the dictionaries.  The -d switch accepts absolute file
>  > names, AFAIR, and will not try to look in ispell-library-directory for
>  > such absolute file names.
> 
> -d doesn't work, because of this code:
> 
> ;; Include if the dictionary is in the library, or dir not defined.
> (if (and
> name
> ;; For Aspell, we already know which dictionaries exist.
> (or ispell-really-aspell
> ;; Include all dictionaries if lib directory not known.
> ;; Same for Hunspell, where ispell-library-directory is nil.
> (not ispell-library-directory)
> (file-exists-p (concat ispell-library-directory
> "/" dict-bname ".hash"))
> (file-exists-p (concat ispell-library-directory
> "/" dict-bname ".has"))))
> (push name dict-list)))
> 
> 
>  > If that doesn't help, then maybe I don't understand what problem,
>  > exactly, are you trying to solve.  What bad things happen if you don't
>  > change the value of ispell-library-directory from its default?
> 
> Then it's not possible to add custom dictionaries (when using cygwin 
> ispell) or dictionaries from other directory, than 
> `ispell-library-directory', because they are ommited by 
> `ispell-valid-dictionary-alist'.
> 
>  > Even if the dictionaries that are arguments of the -d switch are given
>  > as absolute file names?  If so, maybe that's the problem that needs
>  > fixing.
> 
> Yes.

OK, so adding a condition for dict-bname being an absolute file name
in the above snippet would solve your problem?