unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Bob Rogers <rogers@modulargenetics.com>
Cc: 39137@debbugs.gnu.org
Subject: bug#39137: 26.3; ispell-really-hunspell sometimes fails in init
Date: Sat, 18 Jan 2020 12:14:55 +0200	[thread overview]
Message-ID: <83d0bh136o.fsf@gnu.org> (raw)
In-Reply-To: <24094.12723.597917.248404@persepolis.modulargenetics.com> (message from Bob Rogers on Tue, 14 Jan 2020 16:25:07 -0500)

> From: Bob Rogers <rogers@modulargenetics.com>
> 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.





  reply	other threads:[~2020-01-18 10:14 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-14 21:25 bug#39137: 26.3; ispell-really-hunspell sometimes fails in init Bob Rogers
2020-01-18 10:14 ` Eli Zaretskii [this message]
2021-01-29  7:27   ` Lars Ingebrigtsen
2021-03-23 22:13     ` Bob Rogers
2021-03-24  8:11       ` Lars Ingebrigtsen

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=83d0bh136o.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=39137@debbugs.gnu.org \
    --cc=rogers@modulargenetics.com \
    /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).