From: Eli Zaretskii <eliz@gnu.org>
To: Phil Sainty <psainty@orcon.net.nz>
Cc: rpluim@gmail.com, stefan@marxist.se, emacs-devel@gnu.org
Subject: Re: "Can't find Hunspell dictionary" error (was Re: Emacs pretest 28.0.91 is out)
Date: Fri, 14 Jan 2022 14:02:06 +0200 [thread overview]
Message-ID: <83wnj21q69.fsf@gnu.org> (raw)
In-Reply-To: <fd61923cf12b39eefa71628d1d77fe5d@webmail.orcon.net.nz> (message from Phil Sainty on Fri, 14 Jan 2022 22:06:47 +1300)
> Date: Fri, 14 Jan 2022 22:06:47 +1300
> From: Phil Sainty <psainty@orcon.net.nz>
> Cc: rpluim@gmail.com, stefan@marxist.se, emacs-devel@gnu.org
>
> On 2022-01-14 20:12, Eli Zaretskii wrote:
> > IOW, when you say "I wouldn't expect an absence of dictionaries to
> > cause those functions to fail", what do you expect from spell-checking
> > commands to do instead, when there are no dictionaries available to
> > them, except fail?
>
> `ispell-valid-dictionary-list' isn't a spell-checking function per
> se,
> though -- it's a helper function for establishing which dictionaries
> are available for use *by* a spell-checking command.
If you just want to prevent an error in ispell-valid-dictionary-list,
I'm okay with that, although it does seem pointless: you will not be
able to do any real spell-checking anyway. So I question the wisdom
of letting the user think things are okay when they really aren't.
The error is signaled from ispell-find-hunspell-dictionaries, which is
called from other places as well, where having no dictionaries means
we cannot continue. That error has to stay there, for this reason.
> If a command to actually check some spelling was invoked and there
> were no dictionaries, then it would be fair to signal an error, but
> this error is happening when merely asking for a list of dictionaries,
> and an empty list is a valid list.
Once again: what would be a point of showing an empty list? which use
cases it solves that signaling an error doesn't? Is this just
aesthetics, or are there some real-life use cases where this gets in
the way?
> IIUC this is only happening if hunspell is the spell checker, so
> I think this should be considered a bug in the code for handling
> hunspell.
It isn't a bug. Hunspell cannot do anything useful when we don't know
which dictionaries are available. That it happens only with hunspell
is because the method of finding the dictionaries is different, and
with Hunspell the failure generally means the speller is misconfigured
in some way we cannot possibly know.
next prev parent reply other threads:[~2022-01-14 12:02 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-13 7:51 "Can't find Hunspell dictionary" error (was Re: Emacs pretest 28.0.91 is out) Phil Sainty
2022-01-13 8:46 ` Robert Pluim
2022-01-13 10:20 ` Robert Pluim
2022-01-13 10:39 ` Eli Zaretskii
2022-01-13 11:28 ` Phil Sainty
2022-01-13 12:39 ` Eli Zaretskii
2022-01-13 14:05 ` Robert Pluim
2022-01-13 14:42 ` Eli Zaretskii
2022-01-14 1:05 ` Phil Sainty
2022-01-14 7:12 ` Eli Zaretskii
2022-01-14 9:06 ` Phil Sainty
2022-01-14 12:02 ` Eli Zaretskii [this message]
2022-01-13 11:26 ` Phil Sainty
2022-01-13 14:23 ` Robert Pluim
2022-01-13 14:38 ` Robert Pluim
2022-01-13 11:57 ` Phil Sainty
2022-01-13 14:30 ` Robert Pluim
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83wnj21q69.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=psainty@orcon.net.nz \
--cc=rpluim@gmail.com \
--cc=stefan@marxist.se \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.