unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#9121: Error in ispell process
@ 2011-07-19 14:20 jidanni
  2011-09-11  3:06 ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 13+ messages in thread
From: jidanni @ 2011-07-19 14:20 UTC (permalink / raw)
  To: 9121

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.





^ permalink raw reply	[flat|nested] 13+ messages in thread

* bug#9121: Error in ispell process
  2011-07-19 14:20 bug#9121: Error in ispell process jidanni
@ 2011-09-11  3:06 ` Lars Magne Ingebrigtsen
  2011-09-11 15:52   ` Eli Zaretskii
  0 siblings, 1 reply; 13+ messages in thread
From: Lars Magne Ingebrigtsen @ 2011-09-11  3:06 UTC (permalink / raw)
  To: jidanni; +Cc: 9121

jidanni@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/





^ permalink raw reply	[flat|nested] 13+ messages in thread

* bug#9121: Error in ispell process
  2011-09-11  3:06 ` Lars Magne Ingebrigtsen
@ 2011-09-11 15:52   ` Eli Zaretskii
  2011-09-11 16:02     ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 13+ messages in thread
From: Eli Zaretskii @ 2011-09-11 15:52 UTC (permalink / raw)
  To: Lars Magne Ingebrigtsen; +Cc: 9121, jidanni

> Date: Sun, 11 Sep 2011 05:06:56 +0200
> Cc: 9121@debbugs.gnu.org
> 
> jidanni@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?






^ permalink raw reply	[flat|nested] 13+ messages in thread

* bug#9121: Error in ispell process
  2011-09-11 15:52   ` Eli Zaretskii
@ 2011-09-11 16:02     ` Lars Magne Ingebrigtsen
  2011-09-11 17:46       ` Eli Zaretskii
  0 siblings, 1 reply; 13+ messages in thread
From: Lars Magne Ingebrigtsen @ 2011-09-11 16:02 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 9121, jidanni

Eli Zaretskii <eliz@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@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/





^ permalink raw reply	[flat|nested] 13+ messages in thread

* bug#9121: Error in ispell process
  2011-09-11 16:02     ` Lars Magne Ingebrigtsen
@ 2011-09-11 17:46       ` Eli Zaretskii
  2011-09-11 17:59         ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 13+ messages in thread
From: Eli Zaretskii @ 2011-09-11 17:46 UTC (permalink / raw)
  To: Lars Magne Ingebrigtsen; +Cc: 9121, jidanni

> From: Lars Magne Ingebrigtsen <larsi@gnus.org>
> Cc: jidanni@jidanni.org,  9121@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.






^ permalink raw reply	[flat|nested] 13+ messages in thread

* bug#9121: Error in ispell process
  2011-09-11 17:46       ` Eli Zaretskii
@ 2011-09-11 17:59         ` Lars Magne Ingebrigtsen
  2011-09-11 18:09           ` Eli Zaretskii
  0 siblings, 1 reply; 13+ messages in thread
From: Lars Magne Ingebrigtsen @ 2011-09-11 17:59 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 9121, jidanni

Eli Zaretskii <eliz@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/





^ permalink raw reply	[flat|nested] 13+ messages in thread

* bug#9121: Error in ispell process
  2011-09-11 17:59         ` Lars Magne Ingebrigtsen
@ 2011-09-11 18:09           ` Eli Zaretskii
  2011-09-11 20:46             ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 13+ messages in thread
From: Eli Zaretskii @ 2011-09-11 18:09 UTC (permalink / raw)
  To: Lars Magne Ingebrigtsen; +Cc: 9121, jidanni

> From: Lars Magne Ingebrigtsen <larsi@gnus.org>
> Cc: jidanni@jidanni.org,  9121@debbugs.gnu.org
> Date: Sun, 11 Sep 2011 19:59:03 +0200
> 
> Eli Zaretskii <eliz@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?






^ permalink raw reply	[flat|nested] 13+ messages in thread

* bug#9121: Error in ispell process
  2011-09-11 18:09           ` Eli Zaretskii
@ 2011-09-11 20:46             ` Lars Magne Ingebrigtsen
  2011-09-15 18:42               ` Juri Linkov
  0 siblings, 1 reply; 13+ messages in thread
From: Lars Magne Ingebrigtsen @ 2011-09-11 20:46 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 9121, jidanni

Eli Zaretskii <eliz@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/





^ permalink raw reply	[flat|nested] 13+ messages in thread

* bug#9121: Error in ispell process
  2011-09-11 20:46             ` Lars Magne Ingebrigtsen
@ 2011-09-15 18:42               ` Juri Linkov
  2011-09-16  1:55                 ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 13+ messages in thread
From: Juri Linkov @ 2011-09-15 18:42 UTC (permalink / raw)
  To: Lars Magne Ingebrigtsen; +Cc: 9121, jidanni

>> 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.





^ permalink raw reply	[flat|nested] 13+ messages in thread

* bug#9121: Error in ispell process
  2011-09-15 18:42               ` Juri Linkov
@ 2011-09-16  1:55                 ` Lars Magne Ingebrigtsen
  2011-09-16 12:45                   ` Juri Linkov
  0 siblings, 1 reply; 13+ messages in thread
From: Lars Magne Ingebrigtsen @ 2011-09-16  1:55 UTC (permalink / raw)
  To: Juri Linkov; +Cc: 9121, jidanni

Juri Linkov <juri@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/





^ permalink raw reply	[flat|nested] 13+ messages in thread

* bug#9121: Error in ispell process
  2011-09-16  1:55                 ` Lars Magne Ingebrigtsen
@ 2011-09-16 12:45                   ` Juri Linkov
  2011-09-17  5:06                     ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 13+ messages in thread
From: Juri Linkov @ 2011-09-16 12:45 UTC (permalink / raw)
  To: Lars Magne Ingebrigtsen; +Cc: 9121, jidanni

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






^ permalink raw reply	[flat|nested] 13+ messages in thread

* bug#9121: Error in ispell process
  2011-09-16 12:45                   ` Juri Linkov
@ 2011-09-17  5:06                     ` Lars Magne Ingebrigtsen
  2011-09-17 12:08                       ` Juri Linkov
  0 siblings, 1 reply; 13+ messages in thread
From: Lars Magne Ingebrigtsen @ 2011-09-17  5:06 UTC (permalink / raw)
  To: Juri Linkov; +Cc: 9121, jidanni

Juri Linkov <juri@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/





^ permalink raw reply	[flat|nested] 13+ messages in thread

* bug#9121: Error in ispell process
  2011-09-17  5:06                     ` Lars Magne Ingebrigtsen
@ 2011-09-17 12:08                       ` Juri Linkov
  0 siblings, 0 replies; 13+ messages in thread
From: Juri Linkov @ 2011-09-17 12:08 UTC (permalink / raw)
  To: Lars Magne Ingebrigtsen; +Cc: 9121-done, jidanni

>>   Error checking word 台灣跨性別 using aspell with default dictionary
>
> Looks good to me.

Fixed and closed.





^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2011-09-17 12:08 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-19 14:20 bug#9121: Error in ispell process jidanni
2011-09-11  3:06 ` Lars Magne Ingebrigtsen
2011-09-11 15:52   ` Eli Zaretskii
2011-09-11 16:02     ` Lars Magne Ingebrigtsen
2011-09-11 17:46       ` Eli Zaretskii
2011-09-11 17:59         ` Lars Magne Ingebrigtsen
2011-09-11 18:09           ` Eli Zaretskii
2011-09-11 20:46             ` Lars Magne Ingebrigtsen
2011-09-15 18:42               ` Juri Linkov
2011-09-16  1:55                 ` Lars Magne Ingebrigtsen
2011-09-16 12:45                   ` Juri Linkov
2011-09-17  5:06                     ` Lars Magne Ingebrigtsen
2011-09-17 12:08                       ` Juri Linkov

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).