unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Kisaragi Hiu via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 49982@debbugs.gnu.org
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	[thread overview]
Message-ID: <da9be239-c0d9-0f1c-0a19-6f4d91a23e4b@kisaragi-hiu.com> (raw)
In-Reply-To: <834kbxf68o.fsf@gnu.org>

 > 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.





  reply	other threads:[~2021-08-11 11:17 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-10 15:12 bug#49982: 27.2; ispell.el fails to find a Hunspell dictionary to use as default despite ispell-dictionary being set Kisaragi Hiu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-08-10 16:03 ` Eli Zaretskii
2021-08-10 18:51   ` Kisaragi Hiu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-08-10 19:29     ` Eli Zaretskii
2021-08-11 11:17       ` Kisaragi Hiu via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2021-08-11 12:12         ` Eli Zaretskii
2022-08-22 12:57 ` Lars Ingebrigtsen

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=da9be239-c0d9-0f1c-0a19-6f4d91a23e4b@kisaragi-hiu.com \
    --to=bug-gnu-emacs@gnu.org \
    --cc=49982@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=mail@kisaragi-hiu.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).