From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#61190: 28.2; ispell personal dictionary location for hunspell engine Date: Tue, 31 Jan 2023 17:02:36 +0200 Message-ID: <83357q3fxv.fsf@gnu.org> References: <83fsbq3jf1.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11428"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 61190@debbugs.gnu.org To: opngid@gmail.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jan 31 16:04:01 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pMsAz-0002o2-0c for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 31 Jan 2023 16:04:01 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pMsAr-0001O8-Ng; Tue, 31 Jan 2023 10:03:54 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pMsA5-0000y5-Nx for bug-gnu-emacs@gnu.org; Tue, 31 Jan 2023 10:03:12 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pMsA2-0001Nr-Do for bug-gnu-emacs@gnu.org; Tue, 31 Jan 2023 10:03:05 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pMsA2-0001wa-2c for bug-gnu-emacs@gnu.org; Tue, 31 Jan 2023 10:03:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 31 Jan 2023 15:03:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61190 X-GNU-PR-Package: emacs Original-Received: via spool by 61190-submit@debbugs.gnu.org id=B61190.16751773707450 (code B ref 61190); Tue, 31 Jan 2023 15:03:02 +0000 Original-Received: (at 61190) by debbugs.gnu.org; 31 Jan 2023 15:02:50 +0000 Original-Received: from localhost ([127.0.0.1]:54666 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pMs9q-0001w6-9b for submit@debbugs.gnu.org; Tue, 31 Jan 2023 10:02:50 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:59606) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pMs9m-0001vs-4B for 61190@debbugs.gnu.org; Tue, 31 Jan 2023 10:02:48 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pMs9g-0001Ic-Qu; Tue, 31 Jan 2023 10:02:40 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=KCTIpmDrUwe7NI50vBCsKbeXhycsbdHOsLUOYemIRrE=; b=dxoDA2t9v+z6 6Zn/9msmgYBGmZBQvu8v+AT7VyU6bQf4Pkpjue1uEP1zcNzoMddo2OdZ0r0kooQwLjhqpKQaqvKAo grw2ODbN3Y3gZ2UhkjZ0yg1gcmyC3nHDb6nyxYqoQuad+gIyTuy3CWxWchQoUDhDaRzFLZ8K7/mrw xmas8YMz5c3U208opBejn4GM6DXze0hPdq9qZFYcZ/f/eP7H+Y9w2ixVb1WM39OmCsjDH2iz6AQDF RhWYIIEXHsLkA6l4AteIoyUjk2dk5gUuyiltnKJmivI1ZsuppoSUggeL6Kalzvk5RtHimooUZTYZx 0H1xl38+lIQfquuRPueRdA==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pMs9g-0000o0-B3; Tue, 31 Jan 2023 10:02:40 -0500 In-Reply-To: <83fsbq3jf1.fsf@gnu.org> (message from Eli Zaretskii on Tue, 31 Jan 2023 15:47:30 +0200) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:254527 Archived-At: > Cc: 61190@debbugs.gnu.org > Date: Tue, 31 Jan 2023 15:47:30 +0200 > From: Eli Zaretskii > > 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.