Subject: bug#92: cannot start Gnus with idna.el

From: Reiner Steib <[email-masked]>
Date: Thu, 01 Jan 2009 19:14:46 +0100

On Thu, Jan 01 2009, Reiner Steib wrote:

> On Sat, Mar 29 2008, NAKAJI Hiroyuki wrote:
[...]
>> The "while" in idna-to-ascii-response() seems infinite loop.
>>
>> (defun idna-to-ascii-response ()
>>   (while (and (eq (process-status idna-to-ascii-process) 'run)
>>               (null idna-to-ascii-response))
>>     (accept-process-output idna-to-ascii-process 1))
>>   idna-to-ascii-response)
>>
>> The idna-to-ascii-response is called from message.el and the failure
>> itself occurs in
>>
>> (idna-to-ascii "räksmörgås")
>
> I can't reproduce thin on GNU/Linux.  AFAICS, there's nothing wrong in
> Gnus.  I guess you can reproduce the problem without Gnus:
>
>   emacs -Q -l /path/to/idna.el
>
>   In *scratch*, eval:
>
>   (idna-to-ascii "räksmörgås")
>
> If idna-to-ascii-response inf-loops, it's a bug in idna.el, the idn
> program or Emacs' process handling on FreeBSD.
> CC-ing Simon Josefsson, the author of idna.el and libidn.

Sorry, the entry in the emacs bug database didn't contain the
following message:

Subject: Re: cannot start Gnus with idna.el
From: NAKAJI Hiroyuki <[email-masked]>
To: Reiner Steib <[email-masked]>, Simon Josefsson <[email-masked]>
Cc: [email-masked], [email-masked]
Date: Sun, 01 Jun 2008 08:59:26 +0900
Newsgroups: gmane.emacs.devel,gmane.emacs.pretest.bugs,gmane.emacs.gnus.general

Thank you for the comment.

After "make maintainer-clean" in emacs/lisp directory, I successfully
bootstrapped the latest emacs. And then I'm trying this problem again.

>>>>> In <[email-masked]> 
>>>>>	Reiner Steib <[email-masked]> wrote:

> > The "while" in idna-to-ascii-response() seems infinite loop.
> >
> > (defun idna-to-ascii-response ()
> >   (while (and (eq (process-status idna-to-ascii-process) 'run)
> >               (null idna-to-ascii-response))
> >     (accept-process-output idna-to-ascii-process 1))
> >   idna-to-ascii-response)

> Isn't this a bug in `idna.el' then?  Cc-ing Simon therefore.

I'm not sure.

> > The idna-to-ascii-response is called from message.el and the failure
> > itself occurs in
> >
> > (idna-to-ascii "räksmörgås")

> Does it mean, that you can reproduce the problem when evaluating this
> expression after starting "emacs -Q"?

No.

After starting "emacs -Q", loaded /some/where/idna.el, opened
gnus/lisp/message.el (no load of gnus) and evaluated this expression. It
was successfull.

(idna-to-ascii "räksmörgås")
"xn--rksmrgs-5wao1o"

Thanks.
-- 
NAKAJI Hiroyuki

I don't understand why it fails in message.el:

(defcustom message-use-idna (and (condition-case nil (require 'idna)
				   (file-error))
				 (mm-coding-system-p 'utf-8)
				 (executable-find idna-program)
				 (string= (idna-to-ascii "räksmörgås")
					  "xn--rksmrgs-5wao1o")
				 t)
...

Bye, Reiner.