From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#39137: 26.3; ispell-really-hunspell sometimes fails in init Date: Sat, 18 Jan 2020 12:14:55 +0200 Message-ID: <83d0bh136o.fsf@gnu.org> References: <24094.12723.597917.248404@persepolis.modulargenetics.com> Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="19675"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 39137@debbugs.gnu.org To: Bob Rogers Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jan 18 11:16:14 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1isl9J-00052Q-UW for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 18 Jan 2020 11:16:13 +0100 Original-Received: from localhost ([::1]:38820 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1isl9I-0004YV-HC for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 18 Jan 2020 05:16:12 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46661) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1isl99-0004Wn-BM for bug-gnu-emacs@gnu.org; Sat, 18 Jan 2020 05:16:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1isl98-0002Jg-2u for bug-gnu-emacs@gnu.org; Sat, 18 Jan 2020 05:16:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:34558) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1isl97-0002JQ-Vo for bug-gnu-emacs@gnu.org; Sat, 18 Jan 2020 05:16:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1isl97-0005GE-Oy for bug-gnu-emacs@gnu.org; Sat, 18 Jan 2020 05:16:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 18 Jan 2020 10:16:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39137 X-GNU-PR-Package: emacs Original-Received: via spool by 39137-submit@debbugs.gnu.org id=B39137.157934250817339 (code B ref 39137); Sat, 18 Jan 2020 10:16:01 +0000 Original-Received: (at 39137) by debbugs.gnu.org; 18 Jan 2020 10:15:08 +0000 Original-Received: from localhost ([127.0.0.1]:40531 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1isl8E-0004Th-2B for submit@debbugs.gnu.org; Sat, 18 Jan 2020 05:15:07 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:37417) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1isl88-0004P0-Lt for 39137@debbugs.gnu.org; Sat, 18 Jan 2020 05:15:04 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:50058) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1isl83-0001Uj-Cs; Sat, 18 Jan 2020 05:14:55 -0500 Original-Received: from [176.228.60.248] (port=1376 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1isl82-0003T7-Ms; Sat, 18 Jan 2020 05:14:55 -0500 In-reply-to: <24094.12723.597917.248404@persepolis.modulargenetics.com> (message from Bob Rogers on Tue, 14 Jan 2020 16:25:07 -0500) 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: 209.51.188.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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:174805 Archived-At: > From: Bob Rogers > Date: Tue, 14 Jan 2020 16:25:07 -0500 > > Spell checking can die with "(wrong-type-argument stringp nil)" when > ispell-really-hunspell is true. To reproduce (if it reproduces at all > on your system), just do "emacs -Q" with Hunspell installed and M-$ on > any of the words in the startup screen. Granted, this doesn't reproduce on my system. And I have difficulty understanding how could it reproduce on _any_ system, especially in "emacs -Q". > On some of the systems I use, it fails reliably when initializing; on > others, it works reliably. All systems are running the openSUSE Leap > 15.1 release of GNU/Linux, fully updated, with the identical locally- > built RPM version of Emacs 26.3 (with no local patches) and the distro > Hunspell 1.6.2. The key seems to be whether ispell-dictionary-alist is > initialized before ispell-start-process is called Can you step through the ispell.el's initialization code, and explain how come ispell-dictionary-alist ends up being uninitialized by the time ispell-start-process is called for spell-checking? This shouldn't happen. > ;; Parse hunspell affix file if using hunspell and entry is uninitialized. > (if ispell-really-hunspell > (or (cadr (assoc ispell-current-dictionary ispell-dictionary-alist)) > (ispell-hunspell-fill-dictionary-entry ispell-current-dictionary))) > > It appears that "nil" is valid for ispell-current-dictionary and means > "default", but ispell-hunspell-fill-dictionary-entry expects only a > string. On that basis, I would claim that there is a bug that has > perhaps been hidden by being on a rare execution path. But if > ispell-dictionary-alist is already initialized with a "nil" entry, then > ispell-hunspell-fill-dictionary-entry never gets called, leading to the > "reproducible irreproducibility" of this bug. And if > ispell-dictionary-alist should *always* be initialized and contain the > current entry, then this is dead code. It isn't dead code, it just assumes that either ispell-current-dictionary is nil and there's a nil entry in ispell-dictionary-alist, or it is a string that specifies a new dictionary, which is then used to update ispell-dictionary-alist. We need to establish how come the first assumption is false on those affected systems. Thanks.