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 14:02:06 +0200 Message-ID: <83wnj21q69.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> <834k663i5r.fsf@gnu.org> 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="4505"; 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 13:07:08 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 1n8LMI-0000qk-G4 for ged-emacs-devel@m.gmane-mx.org; Fri, 14 Jan 2022 13:07:06 +0100 Original-Received: from localhost ([::1]:36716 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n8LMG-0003UU-PR for ged-emacs-devel@m.gmane-mx.org; Fri, 14 Jan 2022 07:07:04 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:51120) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n8LHU-0000Uh-0w for emacs-devel@gnu.org; Fri, 14 Jan 2022 07:02:08 -0500 Original-Received: from [2001:470:142:3::e] (port=53668 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 1n8LHT-0004ya-Iv; Fri, 14 Jan 2022 07:02:07 -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=Dl0TwGTOO9yCf0Csf/bk9FONSSI7cSjVUy2C2G23oo4=; b=CK39Itp96SeW0JsjQQ7i qx/p4VO2vlwbpagFtSUEej9ZcgCG5WwwM6qfvKFzo500Rc7gR6xwqTyypocj8xzf4i0FCAme+aLC4 5lI4aUl0jsATDh87qm3advxcmqnAS+A83etCHC7S1JgeE542SYV586cPf6+a4m7tWcv0MD7NNUO3r H8hZSNAGVQEkzI0gW+XTsNlD4NRZOlTR6RH54mDEFWekXe9bdhNwYoPDZKw6/oof/QS04ehzFchxT kQTLWSMPHszumkfp2aYW4nUwaIrv5itimIlokzY3ecMTia0kr45yiE1rEIBIpP9VTtWQp40c3+Dwp lVF5Mjchx61iBA==; Original-Received: from [87.69.77.57] (port=4403 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 1n8LHT-0001Ad-By; Fri, 14 Jan 2022 07:02:07 -0500 In-Reply-To: (message from Phil Sainty on Fri, 14 Jan 2022 22:06:47 +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:284742 Archived-At: > Date: Fri, 14 Jan 2022 22:06:47 +1300 > From: Phil Sainty > 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.