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.devel 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 Message-ID: <834k663i5r.fsf@gnu.org> References: <5c74e0fb4c651733c0d8072f7cd40d06@webmail.orcon.net.nz> <878rvk3tw8.fsf@gmail.com> <87zgo02azu.fsf@gmail.com> <83tue73on6.fsf@gnu.org> <1cf6dd192736ae555734abb12bd17e9b@webmail.orcon.net.nz> <83mtjz3j44.fsf@gnu.org> <87lezj3f5d.fsf@gmail.com> <83ee5b3de7.fsf@gnu.org> <0f304fcc8959fd365e95ce36e42b4794@webmail.orcon.net.nz> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18353"; mail-complaints-to="usenet@ciao.gmane.io" Cc: rpluim@gmail.com, stefan@marxist.se, emacs-devel@gnu.org To: Phil Sainty Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Jan 14 09:03:57 2022 Return-path: Envelope-to: ged-emacs-devel@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 1n8HYy-0004eD-VF for ged-emacs-devel@m.gmane-mx.org; Fri, 14 Jan 2022 09:03:57 +0100 Original-Received: from localhost ([::1]:57508 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n8HYw-00087f-PD for ged-emacs-devel@m.gmane-mx.org; Fri, 14 Jan 2022 03:03:54 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:53122) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n8Gl2-0003or-Ec for emacs-devel@gnu.org; Fri, 14 Jan 2022 02:12:22 -0500 Original-Received: from [2001:470:142:3::e] (port=35442 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n8Gl0-0001g4-7p; Fri, 14 Jan 2022 02:12:18 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=Dl/AMjyhNRD1IK8Q9bRv3g7Bx2KILmLcJCFszI/l4yY=; b=Ms9KsKjoQZxa0vI40OjJ x1z9GRG6WH36H1xLxCl87JaktHGH4ECEG0k4J+Nvw9WqB2K6He3R1Val5BWlPeAfQ5M70bqv6XPpy zjnHNMtlo3ITa3k34QVEdzkJjjex+wVvE6ainL32DbIzjzQzsd/gq649VCxN62UxzVsFRavHsCySt xe/FnPaaHbchCJHxw7KhgNAyj9Eg6blnNQCedME0YJpEX0bk4kzmzRKnMPHg8ePMBrRHSKwmD85pl Ok5CKKM4jV19QCAzqXumWBk2JDSsg4CDp9Db7b5IL6j1tRgwauuF0PlFIJdgBHmdBGFEX9GjzhGWR ZocAv439VS5QKA==; Original-Received: from [87.69.77.57] (port=2595 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 1n8Gky-0003Ip-8W; Fri, 14 Jan 2022 02:12:17 -0500 In-Reply-To: <0f304fcc8959fd365e95ce36e42b4794@webmail.orcon.net.nz> (message from Phil Sainty on Fri, 14 Jan 2022 14:05:56 +1300) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:284733 Archived-At: > Date: Fri, 14 Jan 2022 14:05:56 +1300 > From: Phil Sainty > Cc: Robert Pluim , 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?