unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: opngid@gmail.com
Cc: 61190@debbugs.gnu.org
Subject: bug#61190: 28.2; ispell personal dictionary location for hunspell engine
Date: Tue, 31 Jan 2023 17:02:36 +0200	[thread overview]
Message-ID: <83357q3fxv.fsf@gnu.org> (raw)
In-Reply-To: <83fsbq3jf1.fsf@gnu.org> (message from Eli Zaretskii on Tue, 31 Jan 2023 15:47:30 +0200)

> Cc: 61190@debbugs.gnu.org
> Date: Tue, 31 Jan 2023 15:47:30 +0200
> From: Eli Zaretskii <eliz@gnu.org>
> 
> Does it work for you as expected if you invoke Hunspell from the shell
> prompt like this:
> 
>   hunspell -d en_US -p c:/Users/xxx/.hunspell_en_US SOME-FILE
> 
> (which starts Hunspell with its own text-mode user interface), and
> then use the 'i' command inside Hunspell to save some words in the
> personal dictionary?  (I presume that your Hunspell supports the
> interactive invocation like above.)  If that doesn't save in the
> correct file either, then it's a Hunspell bug, and you should report
> it to the folks who develop Hunspell or those who produced the Windows
> port you are using.  Because all Emacs does when you set
> ispell-personal-directory is to invoke Hunspell with the "-p PDICT"
> command-line argument.  If you have Process Explorer installed, you
> should be able to verify that Hunspell is indeed invoked with the -p
> option as above, and if that is so, then the part of Emacs and
> ispell.el works correctly, and the problem is in Hunspell itself.

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.





  reply	other threads:[~2023-01-31 15:02 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-31  0:53 bug#61190: 28.2; ispell personal dictionary location for hunspell engine O G
2023-01-31 13:47 ` Eli Zaretskii
2023-01-31 15:02   ` Eli Zaretskii [this message]
     [not found]     ` <CAEc003eWkHFf2Ta1vJfEFQjXJPS9=xB0doRUP+HedcbuNuPPSQ@mail.gmail.com>
2023-02-01  3:35       ` Eli Zaretskii
2023-02-01  5:58         ` O G
2023-02-01 12:30           ` Eli Zaretskii
2023-02-11 17:07             ` O G
2023-02-11 17:14               ` Eli Zaretskii
2023-02-11 18:16                 ` O G
2023-02-11 18:29                   ` Eli Zaretskii
2023-02-11 19:19                     ` O G
2023-02-12 12:07                       ` Eli Zaretskii
2023-02-12 12:07                     ` Eli Zaretskii
2023-02-01 17:58     ` Juri Linkov
2023-02-01 18:31       ` Eli Zaretskii
2023-07-02 19:19 ` bug#61190: follow-up on ispell-personal-dictionary issue for hunspell O G

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83357q3fxv.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=61190@debbugs.gnu.org \
    --cc=opngid@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).