From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#32319: 27.0.50; flyspell-mode error on start Date: Sat, 04 Aug 2018 14:02:51 +0300 Message-ID: <83ftzutmw4.fsf@gnu.org> References: <87o9eoldcv.fsf@ericabrahamsen.net> <834lgfpggw.fsf@gnu.org> <87600ug7wx.fsf@ericabrahamsen.net> <83effiocc9.fsf@gnu.org> <87d0v1vp9h.fsf@ericabrahamsen.net> NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1533380530 19686 195.159.176.226 (4 Aug 2018 11:02:10 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 4 Aug 2018 11:02:10 +0000 (UTC) Cc: 32319@debbugs.gnu.org To: Eric Abrahamsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Aug 04 13:02:06 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fluJx-0004yN-O9 for geb-bug-gnu-emacs@m.gmane.org; Sat, 04 Aug 2018 13:02:05 +0200 Original-Received: from localhost ([::1]:54638 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fluM4-0001kW-31 for geb-bug-gnu-emacs@m.gmane.org; Sat, 04 Aug 2018 07:04:16 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52275) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fluLv-0001kG-3b for bug-gnu-emacs@gnu.org; Sat, 04 Aug 2018 07:04:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fluLs-0003TY-0m for bug-gnu-emacs@gnu.org; Sat, 04 Aug 2018 07:04:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:35428) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fluLr-0003TU-TT for bug-gnu-emacs@gnu.org; Sat, 04 Aug 2018 07:04:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fluLr-00035Z-F9 for bug-gnu-emacs@gnu.org; Sat, 04 Aug 2018 07:04:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 04 Aug 2018 11:04:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 32319 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 32319-submit@debbugs.gnu.org id=B32319.153338059311816 (code B ref 32319); Sat, 04 Aug 2018 11:04:02 +0000 Original-Received: (at 32319) by debbugs.gnu.org; 4 Aug 2018 11:03:13 +0000 Original-Received: from localhost ([127.0.0.1]:40446 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fluL3-00034W-6R for submit@debbugs.gnu.org; Sat, 04 Aug 2018 07:03:13 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:32925) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fluL0-00034I-94 for 32319@debbugs.gnu.org; Sat, 04 Aug 2018 07:03:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fluKp-00034G-Te for 32319@debbugs.gnu.org; Sat, 04 Aug 2018 07:03:05 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:42295) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fluKp-00034C-Pg; Sat, 04 Aug 2018 07:02:59 -0400 Original-Received: from [176.228.60.248] (port=4344 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1fluKp-0000pJ-7O; Sat, 04 Aug 2018 07:02:59 -0400 In-reply-to: <87d0v1vp9h.fsf@ericabrahamsen.net> (message from Eric Abrahamsen on Wed, 01 Aug 2018 12:51:54 -0700) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:149261 Archived-At: > From: Eric Abrahamsen > Cc: 32319@debbugs.gnu.org > Date: Wed, 01 Aug 2018 12:51:54 -0700 > > If the symlink is not present, the "hunspell -D" output looks like: > > SEARCH PATH:.:: > AVAILABLE DICTIONARIES > /usr/share/hunspell/en_TT > > Can't open affix or dictionary files for dictionary named "en_US". > > IOW, there's no line that matches "\\.aff$", and > `hunspell-default-dictionary' is never set, and the error is raised in > line 1177, where it's assumed that that variable has a value. > > So things go wrong pretty early on, as soon as Hunspell fails to load a > dictionary. Does the patch below produce a useful diagnostic? > What I didn't test was whether having a user option in place, specifying > a dictionary to use, would prevent even that error from being signaled. > Mostly because I don't know which option that would be -- I find the > proliferation of dictionary-holding variables pretty confusing. But I > suppose the ideal situation would be: having a valid option set would > swallow the error and allow the process to continue as normal. AFAIK, with Hunspell we get the default dictionary from Hunspell itself, not from the user. Here's the proposed patch, let me know what you think: diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el index e77bc7e..321d7dd 100644 --- a/lisp/textmodes/ispell.el +++ b/lisp/textmodes/ispell.el @@ -1180,6 +1180,8 @@ ispell-find-hunspell-dictionaries ;; Parse and set values for default dictionary. (setq hunspell-default-dict (or hunspell-multi-dict (car hunspell-default-dict))) + (or hunspell-default-dict + (error "Can't find Hunspell dictionary with an .aff affix file")) (setq hunspell-default-dict-entry (ispell-parse-hunspell-affix-file hunspell-default-dict)) ;; Create an alist of found dicts with only names, except for default dict.