Subject: Re: bug#61190: 28.2; ispell personal dictionary location for hunspell engine

From: Eli Zaretskii <[email-masked]>
Date: Wed, 01 Feb 2023 20:31:23 +0200

> From: Juri Linkov <[email-masked]>
> Cc: [email-masked],  [email-masked]
> Date: Wed, 01 Feb 2023 19:58:17 +0200
> 
> > I looked into the Hunspell's sources, and I think I know why this
> > happens.  Hunspell has a peculiar logic when looking for the personal
> > dictionary.  The outcome of that peculiar logic is that if Hunspell is
> > invoked with "-p PDICT" command-line argument, and PDICT is an
> > absolute file name, that file must already exist, or else Hunspell
> > will decide it cannot use it.  And Emacs always invokes Hunspell with
> > an absolute file name of the personal dictionary.
> >
> > This is arguably a bug in Hunspell, but a workaround is to create an
> > empty file at the location where you want the personal dictionary to
> > be, and then restart the speller.
> 
> This bug exists even on GNU/Linux, so requires such customization:
> 
>   (unless (file-exists-p "~/.hunspell")
>     (shell-command "touch ~/.hunspell"))
>   (setq ispell-personal-dictionary "~/.hunspell")

Yes, the code which does that in Hunspell is not Windows-specific.