GNU bug report logs - #50370
Fix bug in ispell-init-process error handling

Previous Next

Package: emacs;

Reported by: Ian W <ian <at> wahbe.com>

Date: Sat, 4 Sep 2021 11:40:02 UTC

Severity: normal

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #14 received at 50370 <at> debbugs.gnu.org (full text, mbox):

From: Ian W <ian <at> wahbe.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 50370 <at> debbugs.gnu.org
Subject: Re: bug#50370: Fix bug in ispell-init-process error handling
Date: Sat, 4 Sep 2021 12:38:40 -0700
[Message part 1 (text/plain, inline)]
I think that hunspell is different. It validates that the dictionary really exists in the beginning of ispell-start-process:

(defun ispell-start-process ()
 "Start the Ispell process, with support for no asynchronous processes.
Keeps argument list for future Ispell invocations for no async support."
 ;; `ispell-current-dictionary' and `ispell-current-personal-dictionary'
 ;; are properly set in `ispell-internal-change-dictionary'.

 ;; 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)))
…)

Having seen this, I think that this will only be a problem for ispell and aspell. I just tested the recipe and it works on “emacs -Q”  (I have ispell installed correctly, and emacs defaults to that).
On Sep 4, 2021, 11:40 AM -0700, Eli Zaretskii <eliz <at> gnu.org>, wrote:
> [Please use Reply All to keep the bug address on the CC list.]
>
> > Date: Sat, 4 Sep 2021 11:33:42 -0700
> > From: Ian W <ian <at> wahbe.com>
> >
> > I think it’s a better error message, but that is just my opinion. It tells me that ispell is trying to read an invalid
> > dictionary file. In my case, I deleted that file and everything started working. I also think it’s the error message
> > intended to be displayed (by the ispell program and ispell package), as it is the error message designed to
> > help the user solve their problem.
> >
> > (t
> > ;; Otherwise, it must be an error message. Show the user.
> > ;; But first wait to see if some more output is going to arrive.
> > ;; Otherwise we get cool errors like "Can't open ".
> > (sleep-for 1)
> > (ispell-accept-output 3) ;; <<< This is the line that errors >>>
> > (error "%s" (mapconcat #'identity ispell-filter "\n"))))
> >
> > So the intended error message is never displayed.
> >
> > I’m sorry for not including a repo. I got it consistently because I had a bad file cached by aspell (or maybe
> > doom). You also get the same message when you didn’t install your dictionaries correctly. This is a problem
> > in how ispell displays errors, so it’s consistent but only if you already had a real problem with ispell.
> >
> > To repo:
> > (setq ispell-local-dictionary-overridden t
> > ispell-local-dictionary "not-a-dict")
> >
> > This misconfigures your local dictionary, and ensures that the ispell process will error on start. Then run
> > ispell-word on any word. Thanks for the prompt response.
>
> With the above recipe, I get:
>
> ispell-phaf: No matching entry for not-a-dict in ‘ispell-hunspell-dict-paths-alist’.
>
> (My speller is Hunspell.)
>
> So does this mean this problem doesn't happen with Hunspell? Ir is
> the recipe incomplete or something?
[Message part 2 (text/html, inline)]

This bug report was last modified 3 years and 318 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.