From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Kisaragi Hiu via "Bug reports for GNU Emacs, the Swiss army knife of text editors" 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 20:17:20 +0900 Message-ID: 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> Reply-To: Kisaragi Hiu Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33254"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 49982@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Aug 11 13:20:26 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 1mDmHY-0008KS-Ui for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 11 Aug 2021 13:20:25 +0200 Original-Received: from localhost ([::1]:43514 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mDmHW-0000NX-St for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 11 Aug 2021 07:20:22 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43102) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mDmFG-00079i-9p for bug-gnu-emacs@gnu.org; Wed, 11 Aug 2021 07:18:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:50273) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mDmFG-0001K7-2e for bug-gnu-emacs@gnu.org; Wed, 11 Aug 2021 07:18:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mDmFF-0002ob-U9 for bug-gnu-emacs@gnu.org; Wed, 11 Aug 2021 07:18:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Kisaragi Hiu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 11 Aug 2021 11:18:01 +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.16286806569988 (code B ref 49982); Wed, 11 Aug 2021 11:18:01 +0000 Original-Received: (at 49982) by debbugs.gnu.org; 11 Aug 2021 11:17:36 +0000 Original-Received: from localhost ([127.0.0.1]:33586 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mDmEm-0002Yt-IF for submit@debbugs.gnu.org; Wed, 11 Aug 2021 07:17:36 -0400 Original-Received: from out2.migadu.com ([188.165.223.204]:29353) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mDmEg-0002UR-G6 for 49982@debbugs.gnu.org; Wed, 11 Aug 2021 07:17:31 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kisaragi-hiu.com; s=key1; t=1628680644; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=7WKkXF4wZ1bop/67Rq+6Mn/BzyLRSXavXpS3WWlLguI=; b=ZTBhry0T//IclLIdNqLS2VJUbJrfRWTrMkT0/i8jYr26Aw6GhWLQEBvr+lQR3vB53il1Hw zjQjfLevaDXLG4aX7NyaTVuU6I2mzK1ibyN/92CC1rx0NjaAragH0vZrqvv/ADKUvYCDSX AK7jmcGgvcAyy0wLukEhwo/lRANBvyXPsqxAO3Ptk+Zj5EBRTxRaCtvNZLf2Y8ffvcVMTw m4oLBZoskdWZEZ6vjbQ/6Zdtvur7Rz/zA1H+QrmFBLbWfgLdQu8m2MXKKDnvbnvDIWUv4j HeubxnGWQSd0JuNUuLBqaP00AZL5+C3heft6Qc5QG/tQFZHMKjjtM8LLpvbqiA== X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. In-Reply-To: <834kbxf68o.fsf@gnu.org> Content-Language: en-US X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: mail@kisaragi-hiu.com 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:211568 Archived-At: > 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? ispell.el worked around Hunspell 1.7's new output quirk. Why can't it work around this quirk? *My* problem is already solved by using the workaround. The bug is that nobody should have to use the workaround. 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. 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. You can do (in emacs -Q): (setenv "LANG" "ja_JP") ; trigger the quirk (setenv "DICTIONARY" "en_US") ; tame ispell-find-hunspell-dictionaries (setq ispell-program (executable-find "hunspell") ispell-dictionary "en_GB") (flyspell-mode) and see that it's spellchecking color to colour. (Try typing "color" then running M-x flyspell-auto-correct-previous-word) --- ispell-dictionary is ispell.el's way of specifying the main dictionary. The manual: > Spell-checkers look up spelling in two dictionaries: the standard dictionary and your personal dictionary. The standard dictionary is specified by the variable ‘ispell-local-dictionary’ or, if that is ‘nil’, by the variable ‘ispell-dictionary’. If both are ‘nil’, the spelling program’s default dictionary is used. The spelling program's default should only ever have an effect when both ispell-local-dictionary and ispell-dictionary is nil.