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#49982: 27.2; ispell.el fails to find a Hunspell dictionary to use as default despite ispell-dictionary being set Date: Wed, 11 Aug 2021 15:12:40 +0300 Message-ID: <83r1f0dvt3.fsf@gnu.org> References: <59517c95-6568-f646-7097-c601cc9657c9@kisaragi-hiu.com> <83h7fxfft0.fsf@gnu.org> <54d5e013-aeff-ef7b-ad9e-e4c8dfa72d37@kisaragi-hiu.com> <834kbxf68o.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30572"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 49982@debbugs.gnu.org To: Kisaragi Hiu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Aug 11 14:13:11 2021 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 1mDn6d-0007m3-5r for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 11 Aug 2021 14:13:11 +0200 Original-Received: from localhost ([::1]:46792 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mDn6b-0008KX-66 for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 11 Aug 2021 08:13:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55796) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mDn6U-0008KB-Q1 for bug-gnu-emacs@gnu.org; Wed, 11 Aug 2021 08:13:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:50409) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mDn6U-0007R2-JM for bug-gnu-emacs@gnu.org; Wed, 11 Aug 2021 08:13:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mDn6U-0000H5-DH for bug-gnu-emacs@gnu.org; Wed, 11 Aug 2021 08:13:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 11 Aug 2021 12:13:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49982 X-GNU-PR-Package: emacs Original-Received: via spool by 49982-submit@debbugs.gnu.org id=B49982.16286839551018 (code B ref 49982); Wed, 11 Aug 2021 12:13:02 +0000 Original-Received: (at 49982) by debbugs.gnu.org; 11 Aug 2021 12:12:35 +0000 Original-Received: from localhost ([127.0.0.1]:33722 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mDn63-0000GK-AT for submit@debbugs.gnu.org; Wed, 11 Aug 2021 08:12:35 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:46880) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mDn62-0000G9-1a for 49982@debbugs.gnu.org; Wed, 11 Aug 2021 08:12:34 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:56362) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mDn5w-00073i-2a; Wed, 11 Aug 2021 08:12:28 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:4834 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 1mDn5v-0005Ko-Lv; Wed, 11 Aug 2021 08:12:27 -0400 In-Reply-To: (message from Kisaragi Hiu on Wed, 11 Aug 2021 20:17:20 +0900) 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" Xref: news.gmane.io gmane.emacs.bugs:211580 Archived-At: > From: Kisaragi Hiu > Cc: 49982@debbugs.gnu.org > Date: Wed, 11 Aug 2021 20:17:20 +0900 > > > Indeed, defining DICTIONARY in the environment is the way to control > the default dictionary. It is documented in the Hunspell's man page. > Why cannot it be the solution for when no Hunspell dictionary could be > found that matches the locale? Using $DICTIONARY should solve your > problem both inside Emacs and outside it. > > I don't know, maybe I'm biased here. Hunspell has its quirks, but isn't > it ispell.el's job to work around quirks in spellcheckers, and not the > end user's? Not when the spell-checker is basically not configured correctly. > ispell.el worked around Hunspell 1.7's new output quirk. That was something users could do nothing on their end to solve. > Using environment variables to configure subprocesses is always > something that a user can do, but, as you know, there's a reason why > ispell.el exposes spellchecker options through Emacs user options. That's not what I meant. I meant to suggest that you set DICTIONARY in the init files of your interactive shell, so that it would allow you to use Hunspell both inside Emacs (because Emacs inherits the environment variables of its parent shell) and outside Emacs. I didn't mean to suggest that you (or others) should inject DICTIONARY into the environment of the Hunspell sub-process by doing something in Emacs, like setenv etc. > Besides, which dictionary one specifies in `DICTIONARY` doesn't actually > matter, it just needs to be one that exists, as it will be overridden by > ispell-dictionary when ispell.el actually starts spellchecking. It should be the dictionary you want to use by default. In your case, I assume it's en_US.