unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
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 09:12:16 +0200	[thread overview]
Message-ID: <834k663i5r.fsf@gnu.org> (raw)
In-Reply-To: <0f304fcc8959fd365e95ce36e42b4794@webmail.orcon.net.nz> (message from Phil Sainty on Fri, 14 Jan 2022 14:05:56 +1300)

> Date: Fri, 14 Jan 2022 14:05:56 +1300
> From: Phil Sainty <psainty@orcon.net.nz>
> Cc: Robert Pluim <rpluim@gmail.com>, stefan@marxist.se, emacs-devel@gnu.org
> 
> On 2022-01-14 03:42, Eli Zaretskii wrote:
> >>     >> Using `with-demoted-errors' would achieve both goals, I think?
> >> 
> >>     Eli> Using that where? in the test suite?
> >> 
> >> Yes, for this one specific test. Although Iʼd prefer `ignore-errors',
> > 
> > Fine with me.
> 
> I agree with `ignore-errors' for the test suite.
> 
> My `with-⁠demoted-⁠errors' suggestion was actually regarding
> `ispell-⁠valid-⁠dictionary-⁠list' or `ispell-⁠set-⁠spellchecker-⁠params'
> as I wouldn't expect an absence of dictionaries to cause those
> functions (or at least the former) to fail.
> 
> I haven't looked at them in detail, but my gut feeling was that
> `ispell-⁠valid-⁠dictionary-⁠list' should be returning an empty list
> in that scenario.  I thought that if a warning message was logged
> along the way to point out that no dictionaries were installed,
> that would seem fine (and preferable to an error).
> 
> Maybe not a change for 28.1, but potentially for master?

It is not clear to me what change you have in mind, or what change
could at all be possible.

We signal an error there because without it we will signal an error
later, where the context is lost and we cannot provide a meaningful
error message.

So with the current code, signaling an error there was deemed to be
the best solution for a situation where a spell-checker cannot do
anything useful -- without dictionaries, the speller is useless.  How
would you propose to continue using a speller without dictionaries,
and how would it help to return an empty list of dictionaries to the
caller? what would the caller do with such an empty list?

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?



  reply	other threads:[~2022-01-14  7:12 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 [this message]
2022-01-14  9:06                   ` Phil Sainty
2022-01-14 12:02                     ` Eli Zaretskii
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

  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=834k663i5r.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 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).