GNU bug report logs - #9121
Error in ispell process

Previous Next

Package: emacs;

Reported by: jidanni <at> jidanni.org

Date: Tue, 19 Jul 2011 14:21:01 UTC

Severity: minor

Done: Juri Linkov <juri <at> jurta.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 9121 in the body.
You can then email your comments to 9121 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#9121; Package emacs. (Tue, 19 Jul 2011 14:21:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to jidanni <at> jidanni.org:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 19 Jul 2011 14:21:02 GMT) Full text and rfc822 format available.

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

From: jidanni <at> jidanni.org
To: bug-gnu-emacs <at> gnu.org
Subject: Error in ispell process
Date: Tue, 19 Jul 2011 22:20:10 +0800
I do ispell-word on a Chinese word by accident.

Checking spelling of 台灣跨性別...
Error in ispell process

Well even if I don't have the right dictionaries installed, etc. it
should give a better error message.

No I don't intend to spell check Chinese. I just think it needs a better message.




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#9121; Package emacs. (Sun, 11 Sep 2011 03:33:02 GMT) Full text and rfc822 format available.

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

From: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
To: jidanni <at> jidanni.org
Cc: 9121 <at> debbugs.gnu.org
Subject: Re: Error in ispell process
Date: Sun, 11 Sep 2011 05:06:56 +0200
jidanni <at> jidanni.org writes:

> I do ispell-word on a Chinese word by accident.
>
> Checking spelling of 台灣跨性別...
> Error in ispell process
>
> Well even if I don't have the right dictionaries installed, etc. it
> should give a better error message.

I first thought is was a charset issue, but apparently not.  I've tried
debugging this, but ispell really seems to give a blank output for this,
so I think that "Error in ispell process" is actually correct.

Anybody know what this would mean otherwise?

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#9121; Package emacs. (Sun, 11 Sep 2011 15:57:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
Cc: 9121 <at> debbugs.gnu.org, jidanni <at> jidanni.org
Subject: Re: bug#9121: Error in ispell process
Date: Sun, 11 Sep 2011 18:52:32 +0300
> Date: Sun, 11 Sep 2011 05:06:56 +0200
> Cc: 9121 <at> debbugs.gnu.org
> 
> jidanni <at> jidanni.org writes:
> 
> > I do ispell-word on a Chinese word by accident.
> >
> > Checking spelling of 台灣跨性別...
> > Error in ispell process
> >
> > Well even if I don't have the right dictionaries installed, etc. it
> > should give a better error message.
> 
> I first thought is was a charset issue, but apparently not.

Why do you think it isn't a charset issue?

> I've tried debugging this, but ispell really seems to give a blank
> output for this, so I think that "Error in ispell process" is
> actually correct.
> 
> Anybody know what this would mean otherwise?

Question 1: Is this really ispell, or aspell (or something else)?

Question 2: What does the speller program, whatever it is, says when
invoked from the command line on the same word?





Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#9121; Package emacs. (Sun, 11 Sep 2011 16:12:03 GMT) Full text and rfc822 format available.

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

From: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 9121 <at> debbugs.gnu.org, jidanni <at> jidanni.org
Subject: Re: bug#9121: Error in ispell process
Date: Sun, 11 Sep 2011 18:02:28 +0200
Eli Zaretskii <eliz <at> gnu.org> writes:

>> I first thought is was a charset issue, but apparently not.
>
> Why do you think it isn't a charset issue?

Because I tried it with "héllo", and then it didn't give an error, but
sensible output.  

>> I've tried debugging this, but ispell really seems to give a blank
>> output for this, so I think that "Error in ispell process" is
>> actually correct.
>> 
>> Anybody know what this would mean otherwise?
>
> Question 1: Is this really ispell, or aspell (or something else)?

Let's see..

ispell-program-name => "/usr/bin/aspell"    

> Question 2: What does the speller program, whatever it is, says when
> invoked from the command line on the same word?

[larsi <at> stories ~/src/emacs/trunk/lisp/textmodes]$ aspell --pipe
@(#) International Ispell Version 3.1.20 (but really Aspell 0.60.6)
héllo
& héllo 34 0: hello, Helli, hell, hallo, hullo, Heall, he'll, hellos, jello, Halli, Heller, Holli, hallow, hollow, Hall, Hill, Hull, hall, halo, heal, heel, hill, hull, hells, Cello, cello, Hally, Hilly, Holly, hilly, holly, hello's, Hell's, hell's

灣

lala
& lala 17 0: Layla, la la, la-la, Alla, Kala, Ala, Lalo, Lela, Lila, Lola, Lula, Lana, Lara, Mala, gala, lama, lava

So 灣 gives an empty output, which is what triggers the "Error in
ispell" message.

So perhaps it's a charset issue anyway?

русский also gives an empty output.

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#9121; Package emacs. (Sun, 11 Sep 2011 17:51:01 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
Cc: 9121 <at> debbugs.gnu.org, jidanni <at> jidanni.org
Subject: Re: bug#9121: Error in ispell process
Date: Sun, 11 Sep 2011 20:46:00 +0300
> From: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
> Cc: jidanni <at> jidanni.org,  9121 <at> debbugs.gnu.org
> Date: Sun, 11 Sep 2011 18:02:28 +0200
> 
> @(#) International Ispell Version 3.1.20 (but really Aspell 0.60.6)
> héllo
> & héllo 34 0: hello, Helli, hell, hallo, hullo, Heall, he'll, hellos, jello, Halli, Heller, Holli, hallow, hollow, Hall, Hill, Hull, hall, halo, heal, heel, hill, hull, hells, Cello, cello, Hally, Hilly, Holly, hilly, holly, hello's, Hell's, hell's
> 
> 灣
> 
> lala
> & lala 17 0: Layla, la la, la-la, Alla, Kala, Ala, Lalo, Lela, Lila, Lola, Lula, Lana, Lara, Mala, gala, lama, lava
> 
> So 灣 gives an empty output, which is what triggers the "Error in
> ispell" message.
> 
> So perhaps it's a charset issue anyway?

Maybe I don't know (doesn't aspell use UTF-8?).  Someone who knows
aspell should tell; I'm an old Ispell junkie.





Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#9121; Package emacs. (Sun, 11 Sep 2011 18:07:01 GMT) Full text and rfc822 format available.

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

From: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 9121 <at> debbugs.gnu.org, jidanni <at> jidanni.org
Subject: Re: bug#9121: Error in ispell process
Date: Sun, 11 Sep 2011 19:59:03 +0200
Eli Zaretskii <eliz <at> gnu.org> writes:

> Maybe I don't know (doesn't aspell use UTF-8?).  Someone who knows
> aspell should tell; I'm an old Ispell junkie.

Well, twiddling with the coding system does...  something:

(let* ((coding-system-for-read 'utf-8)
       (coding-system-for-write 'utf-8)
       (process (start-process "aspell" (current-buffer) "aspell" "--pipe")))
  (process-send-string process "русскийlala")
  (process-send-string process "\n"))
=>
@(#) International Ispell Version 3.1.20 (but really Aspell 0.60.6)
*
*
*
*
*
*
*
& lala 17 14: Layla, la la, la-la, Alla, Kala, Ala, Lalo, Lela, Lila, Lola, Lula, Lana, Lara, Mala, gala, lama, lava

But it's not really better, is it?

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#9121; Package emacs. (Sun, 11 Sep 2011 18:15:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
Cc: 9121 <at> debbugs.gnu.org, jidanni <at> jidanni.org
Subject: Re: bug#9121: Error in ispell process
Date: Sun, 11 Sep 2011 21:09:40 +0300
> From: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
> Cc: jidanni <at> jidanni.org,  9121 <at> debbugs.gnu.org
> Date: Sun, 11 Sep 2011 19:59:03 +0200
> 
> Eli Zaretskii <eliz <at> gnu.org> writes:
> 
> > Maybe I don't know (doesn't aspell use UTF-8?).  Someone who knows
> > aspell should tell; I'm an old Ispell junkie.
> 
> Well, twiddling with the coding system does...  something:
> 
> (let* ((coding-system-for-read 'utf-8)
>        (coding-system-for-write 'utf-8)
>        (process (start-process "aspell" (current-buffer) "aspell" "--pipe")))
>   (process-send-string process "русскийlala")
>   (process-send-string process "\n"))
> =>
> @(#) International Ispell Version 3.1.20 (but really Aspell 0.60.6)
> *
> *
> *
> *
> *
> *
> *
> & lala 17 14: Layla, la la, la-la, Alla, Kala, Ala, Lalo, Lela, Lila, Lola, Lula, Lana, Lara, Mala, gala, lama, lava
> 
> But it's not really better, is it?

Do you even have a Russian dictionary installed?





Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#9121; Package emacs. (Sun, 11 Sep 2011 20:54:02 GMT) Full text and rfc822 format available.

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

From: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 9121 <at> debbugs.gnu.org, jidanni <at> jidanni.org
Subject: Re: bug#9121: Error in ispell process
Date: Sun, 11 Sep 2011 22:46:17 +0200
Eli Zaretskii <eliz <at> gnu.org> writes:

> Do you even have a Russian dictionary installed?

Probably not.  But the `coding-system-for-write' thing shows that the
"Error in ispell" message may be coding-system-related.

The following invocation, without the coding system stuff, displays the
issue: 

(let* ((process (start-process "aspell" (current-buffer) "aspell" "--pipe")))
  (process-send-string process "русский")
  (process-send-string process "\n"))

I.e., there's no output here instead of a blank line, which is what
you're supposed to get if aspell doesn't know anything about the word.

However, it outputs six newlines, so the coding system stuff doesn't fix
the issue totally.

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#9121; Package emacs. (Thu, 15 Sep 2011 18:56:03 GMT) Full text and rfc822 format available.

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

From: Juri Linkov <juri <at> jurta.org>
To: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 9121 <at> debbugs.gnu.org, jidanni <at> jidanni.org
Subject: Re: bug#9121: Error in ispell process
Date: Thu, 15 Sep 2011 21:42:24 +0300
>> Do you even have a Russian dictionary installed?
>
> Probably not.  But the `coding-system-for-write' thing shows that the
> "Error in ispell" message may be coding-system-related.

It's not coding-system-related.  When you change the dictionary with e.g.
`M-x ispell-change-dictionary RET russian RET' then everything is ok.
This can be also confirmed with a standalone invocation:
`aspell -d russian --pipe'.

So the problem here is just with an uninformative and user-unfriendly
error message when the current dictionary mismatches the checked text.

But it's still better than when `ispell-region' just says:
"Spell-checking region using aspell with default dictionary...done"
like everything went fine.




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#9121; Package emacs. (Fri, 16 Sep 2011 02:08:03 GMT) Full text and rfc822 format available.

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

From: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
To: Juri Linkov <juri <at> jurta.org>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 9121 <at> debbugs.gnu.org, jidanni <at> jidanni.org
Subject: Re: bug#9121: Error in ispell process
Date: Fri, 16 Sep 2011 03:55:04 +0200
Juri Linkov <juri <at> jurta.org> writes:

> It's not coding-system-related.  When you change the dictionary with e.g.
> `M-x ispell-change-dictionary RET russian RET' then everything is ok.
> This can be also confirmed with a standalone invocation:
> `aspell -d russian --pipe'.

Right.  How about changing the message to

"Error in ispell process (possibly wrong dictionary?)"

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#9121; Package emacs. (Fri, 16 Sep 2011 20:14:02 GMT) Full text and rfc822 format available.

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

From: Juri Linkov <juri <at> jurta.org>
To: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 9121 <at> debbugs.gnu.org, jidanni <at> jidanni.org
Subject: Re: bug#9121: Error in ispell process
Date: Fri, 16 Sep 2011 15:45:46 +0300
> Right.  How about changing the message to
>
> "Error in ispell process (possibly wrong dictionary?)"

There may be other reasons for errors.  We can't say for sure because we
can't determine the language of the checked word.  (Well, we could add
a package for automatic language identification at some point later :-)

`ispell-region' solves this problem by saying in its message which
dictionary has been used for spell-checking, e.g.

  Spell-checking region using aspell with default dictionary...done

The same could be done for `ispell-word' as well:

  Error checking word 台灣跨性別 using aspell with default dictionary

So users will see enough information to figure out what's wrong:

=== modified file 'lisp/textmodes/ispell.el'
--- lisp/textmodes/ispell.el	2011-08-25 19:54:07 +0000
+++ lisp/textmodes/ispell.el	2011-09-16 12:39:49 +0000
@@ -1723,7 +1723,11 @@ (defun ispell-word (&optional following
 		  (extent-at start)
 		  (and (fboundp 'delete-extent)
 		       (delete-extent (extent-at start)))))
-	    ((null poss) (message "Error in ispell process"))
+	    ((null poss)
+	     (message "Error checking word %s using %s with %s dictionary"
+		      (funcall ispell-format-word-function word)
+		      (file-name-nondirectory ispell-program-name)
+		      (or ispell-current-dictionary "default")))
 	    (ispell-check-only	      ; called from ispell minor mode.
 	     (if (fboundp 'make-extent)
 		 (if (fboundp 'set-extent-property)
@@ -3034,7 +3038,7 @@ (defun ispell-tex-arg-end (&optional arg
 	(while (looking-at "[ \t\n]*\\[") (forward-sexp))
 	(forward-sexp (or arg 1)))
     (error
-     (message "error skipping s-expressions at point %d." (point))
+     (message "Error skipping s-expressions at point %d." (point))
      (beep)
      (sit-for 2))))





Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#9121; Package emacs. (Sat, 17 Sep 2011 05:15:04 GMT) Full text and rfc822 format available.

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

From: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
To: Juri Linkov <juri <at> jurta.org>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 9121 <at> debbugs.gnu.org, jidanni <at> jidanni.org
Subject: Re: bug#9121: Error in ispell process
Date: Sat, 17 Sep 2011 07:06:26 +0200
Juri Linkov <juri <at> jurta.org> writes:

> `ispell-region' solves this problem by saying in its message which
> dictionary has been used for spell-checking, e.g.
>
>   Spell-checking region using aspell with default dictionary...done
>
> The same could be done for `ispell-word' as well:
>
>   Error checking word 台灣跨性別 using aspell with default dictionary

Looks good to me.

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/




Reply sent to Juri Linkov <juri <at> jurta.org>:
You have taken responsibility. (Sat, 17 Sep 2011 12:16:02 GMT) Full text and rfc822 format available.

Notification sent to jidanni <at> jidanni.org:
bug acknowledged by developer. (Sat, 17 Sep 2011 12:16:03 GMT) Full text and rfc822 format available.

Message #43 received at 9121-done <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> jurta.org>
To: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
Cc: 9121-done <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>,
	jidanni <at> jidanni.org
Subject: Re: bug#9121: Error in ispell process
Date: Sat, 17 Sep 2011 15:08:33 +0300
>>   Error checking word 台灣跨性別 using aspell with default dictionary
>
> Looks good to me.

Fixed and closed.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 16 Oct 2011 11:24:02 GMT) Full text and rfc822 format available.

This bug report was last modified 12 years and 204 days ago.

Previous Next


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