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 15:47:30 +0200 Message-ID: <83fsbq3jf1.fsf@gnu.org> References: Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17257"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 61190@debbugs.gnu.org To: O G Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jan 31 15:43:24 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 1pMrr1-0004Lt-HE for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 31 Jan 2023 15:43:23 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pMqzi-0004Wb-0F; Tue, 31 Jan 2023 08:48:18 -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 1pMqzT-0004Vh-I6 for bug-gnu-emacs@gnu.org; Tue, 31 Jan 2023 08:48:03 -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 1pMqzT-0007K4-21 for bug-gnu-emacs@gnu.org; Tue, 31 Jan 2023 08:48:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pMqzS-0007bq-O5 for bug-gnu-emacs@gnu.org; Tue, 31 Jan 2023 08:48: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 13:48: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.167517286429216 (code B ref 61190); Tue, 31 Jan 2023 13:48:02 +0000 Original-Received: (at 61190) by debbugs.gnu.org; 31 Jan 2023 13:47:44 +0000 Original-Received: from localhost ([127.0.0.1]:51871 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pMqzA-0007bA-Da for submit@debbugs.gnu.org; Tue, 31 Jan 2023 08:47:44 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:42488) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pMqz6-0007ag-SR for 61190@debbugs.gnu.org; Tue, 31 Jan 2023 08:47:41 -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 1pMqz1-0007Id-Dr; Tue, 31 Jan 2023 08:47:35 -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=rzvQPTgO3uGGYKgzYz6ojBrw4ao7vyBtfJFIvMzVgqQ=; b=YdDbYJybi4Qb UzLZCgAaT61MWFtCjK3Ea+6rAb/ac4srEAjUwmnCcB9Lkw/7U9qC0xTf82KQ0TfYFKdHwoBhmHu8j SY9Lh2zulApYRz70VBUt5UQkgwPOsyCfMiONsTu3k3z7sPTiDJ6Qxo6DPlrIbTOPHwiXGR/o+sHqR Cwd/PhNvaKqzW4glrOQHssZN4oZYeBjQOzXAs1+9mN5mTSwkCwhp9zool5+ylz5pw5vP/FwDJmsjY G7buO8wTdKcGS4fIlbYsgoNGcexu4wmdS2vK5Y6uWpiXPP/lXnuk6xTlvBy8Z246RSvSp0Oerj4Up qbE/iluBsak9+2h12j/5PA==; 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 1pMqz0-0002a4-TJ; Tue, 31 Jan 2023 08:47:35 -0500 In-Reply-To: (message from O G on Mon, 30 Jan 2023 19:53:19 -0500) 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:254519 Archived-At: > From: O G > Date: Mon, 30 Jan 2023 19:53:19 -0500 > > The ispell package in Emacs is not using the user-specified location of > the personal dictionary for hunspell. > > In particular, neither of these two settings are being respected: > > (setq ispell-personal-directory "/c/Users/xxxx/.hunspell_en_US") > (setq ispell-cmd-args "-p /c/Users/xxxx/.hunspell_en_US") These are incorrect settings: the native Windows build of Emacs doesn't understand the MSYS /c/foo/bar notation. Please use the native Windows format "c:/Users/xxx/" or "C:\\Users\\xxx\\" instead (both should work, but backslashes need to be escaped in Emacs strings). > Instead, it appears that ispell is hardwired to use the file > %USERPROFILE%hunspell_en_US regardless of whether or not the user has > specified another choice for their personal dictionary. > > Note that a file named %USERPROFILE%hunspell_en_US is being created at > the save prompt when adding a new spelling regardless of whether or not > a file named .hunspell_en_US already exists in the user's home directory > (the default file path for a personal directory) and that the Windows > macro %USERPROFILE% is not being properly expanded either (so it becomes > part of the dictionary name in unexpanded form). > > Hunspell is the latest version (1.7.2) installed from the MINGW64 repository > in the MYSYS2 project. It is otherwise working just fine with Emacs > using the following two settings: 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.