unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* eval'ing message-use-idna defcustom hangs emacs
@ 2014-04-23  2:04 Eric Abrahamsen
  2015-01-28  6:12 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 7+ messages in thread
From: Eric Abrahamsen @ 2014-04-23  2:04 UTC (permalink / raw)
  To: ding; +Cc: help-gnu-emacs

Yesterday, emacs started hanging when I loaded gnus. The problem turned
out to be this defcustom from 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)
;;   "Whether to encode non-ASCII in domain names into ASCII according to IDNA.
;; GNU Libidn, and in particular the elisp package \"idna.el\" and
;; the external program \"idn\", must be installed for this
;; functionality to work."
;;   :version "22.1"
;;   :group 'message-headers
;;   :link '(custom-manual "(message)IDNA")
;;   :type '(choice (const :tag "Ask" ask)
;; 		 (const :tag "Never" nil)
;; 		 (const :tag "Always" t)))

idna can be required, and the executable is found (/usr/bin/idn).
Archlinux's libidn package is at 1.28-2. I'm using git gnus and
emacs-version "24.3.1". I don't think anything has changed recently.

It seems that the process call to idna never returns. I set
toggle-debug-on-quit, and hit C-g during the hang, and get this
backtrace:

Debugger entered--Lisp error: (quit)
  accept-process-output(#<process idna> 1)
  (while (and (eq (process-status idna-to-ascii-process) (quote run)) (null idna-to-ascii-response)) (accept-process-output idna-to-ascii-process 1))
  idna-to-ascii-response()
  (setq string (idna-to-ascii-response))
  (if (null proc) (error "Cannot start idn application (to-ascii)") (idna-to-ascii-response-clear) (process-send-string proc (concat str "\n")) (setq string (idna-to-ascii-response)) (if (and string (string= (substring string (1- (length string))) "\n")) (substring string 0 (1- (length string))) string))
  (let ((proc (idna-to-ascii-process)) string) (if (null proc) (error "Cannot start idn application (to-ascii)") (idna-to-ascii-response-clear) (process-send-string proc (concat str "\n")) (setq string (idna-to-ascii-response)) (if (and string (string= (substring string (1- (length string))) "\n")) (substring string 0 (1- (length string))) string)))
  idna-to-ascii("räksmörgås")
  eval((idna-to-ascii "räksmörgås") nil)
  eval-last-sexp-1(nil)
  eval-last-sexp(nil)
  call-interactively(eval-last-sexp nil nil)

I've just commented out the defcustom and set the variable directly to
t. That seems to work, but I hope someone can shed some light on the
above!

Thanks,
Eric




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

* Re: eval'ing message-use-idna defcustom hangs emacs
  2014-04-23  2:04 eval'ing message-use-idna defcustom hangs emacs Eric Abrahamsen
@ 2015-01-28  6:12 ` Lars Ingebrigtsen
  2015-01-28 15:32   ` Eli Zaretskii
  0 siblings, 1 reply; 7+ messages in thread
From: Lars Ingebrigtsen @ 2015-01-28  6:12 UTC (permalink / raw)
  To: Eric Abrahamsen; +Cc: help-gnu-emacs, ding

Eric Abrahamsen <eric@ericabrahamsen.net> writes:

> idna can be required, and the executable is found (/usr/bin/idn).
> Archlinux's libidn package is at 1.28-2. I'm using git gnus and
> emacs-version "24.3.1". I don't think anything has changed recently.
>
> It seems that the process call to idna never returns. I set
> toggle-debug-on-quit, and hit C-g during the hang, and get this
> backtrace:
>
> Debugger entered--Lisp error: (quit)
>   accept-process-output(#<process idna> 1)
>   (while (and (eq (process-status idna-to-ascii-process) (quote run))

[...]

> (length string))) string)))
>   idna-to-ascii("räksmörgås")

I'm on a Fedora laptop, and installing libidn doesn't seem to install
idna.el, so I can't test this.  Are you still seeing hangs in

(idna-to-ascii "räksmörgås")

?

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



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

* Re: eval'ing message-use-idna defcustom hangs emacs
  2015-01-28  6:12 ` Lars Ingebrigtsen
@ 2015-01-28 15:32   ` Eli Zaretskii
  2015-01-28 16:21     ` Dale Snell
                       ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Eli Zaretskii @ 2015-01-28 15:32 UTC (permalink / raw)
  To: help-gnu-emacs, ding

> From: Lars Ingebrigtsen <larsi@gnus.org>
> Date: Wed, 28 Jan 2015 17:12:03 +1100
> Cc: help-gnu-emacs@gnu.org, ding@gnus.org
> 
> I'm on a Fedora laptop, and installing libidn doesn't seem to install
> idna.el

That's a packaging problem: if you build libidn yourself, "make
install" does install the Lisp interface.



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

* Re: eval'ing message-use-idna defcustom hangs emacs
  2015-01-28 15:32   ` Eli Zaretskii
@ 2015-01-28 16:21     ` Dale Snell
  2015-01-29 22:36     ` Jason L Tibbitts III
       [not found]     ` <mailman.18939.1422571379.1147.help-gnu-emacs@gnu.org>
  2 siblings, 0 replies; 7+ messages in thread
From: Dale Snell @ 2015-01-28 16:21 UTC (permalink / raw)
  To: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 803 bytes --]

On Wed, 28 Jan 2015 17:32:43 +0200, in message 83pp9yor8k.fsf@gnu.org,
Eli Zaretskii wrote:

> > From: Lars Ingebrigtsen <larsi@gnus.org>
> > Date: Wed, 28 Jan 2015 17:12:03 +1100
> > Cc: help-gnu-emacs@gnu.org, ding@gnus.org
> > 
> > I'm on a Fedora laptop, and installing libidn doesn't seem to
> > install idna.el
> 
> That's a packaging problem: if you build libidn yourself, "make
> install" does install the Lisp interface.
> 

The Emacs package is available for Fedora, as
"emacs-libidn.noarch".  Doing a "yum list \*idn\*" will find it.
"yum install emacs-libidn" will pull in the emacs package.  I
haven't used it, but it looks to me like you'll need a
(require 'idna) in your ~/.emacs.d/init.el.

Hope this helps.

--Dale

-- 
Mickey Mouse wears a Spiro Agnew watch.

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

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

* Re: eval'ing message-use-idna defcustom hangs emacs
  2015-01-28 15:32   ` Eli Zaretskii
  2015-01-28 16:21     ` Dale Snell
@ 2015-01-29 22:36     ` Jason L Tibbitts III
       [not found]     ` <mailman.18939.1422571379.1147.help-gnu-emacs@gnu.org>
  2 siblings, 0 replies; 7+ messages in thread
From: Jason L Tibbitts III @ 2015-01-29 22:36 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: help-gnu-emacs, ding

>>>>> "EZ" == Eli Zaretskii <eliz@gnu.org> writes:

EZ> That's a packaging problem: if you build libidn yourself, "make
EZ> install" does install the Lisp interface.

It's.... not a packaging problem.  Why should installing libidn pull in
emacs?  In any case, there's a convenient emacs-libidn package in
Fedora:

> repoquery -l emacs-libidn
/usr/share/emacs/site-lisp/libidn
/usr/share/emacs/site-lisp/libidn/idna.el
/usr/share/emacs/site-lisp/libidn/idna.elc
/usr/share/emacs/site-lisp/libidn/punycode.el
/usr/share/emacs/site-lisp/libidn/punycode.elc

 - J<



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

* Re: eval'ing message-use-idna defcustom hangs emacs
       [not found]     ` <mailman.18939.1422571379.1147.help-gnu-emacs@gnu.org>
@ 2015-01-29 23:36       ` Lars Magne Ingebrigtsen
  2015-01-30  2:42         ` Eric Abrahamsen
  0 siblings, 1 reply; 7+ messages in thread
From: Lars Magne Ingebrigtsen @ 2015-01-29 23:36 UTC (permalink / raw)
  To: Jason L Tibbitts III; +Cc: Eli Zaretskii, help-gnu-emacs, ding

Jason L Tibbitts III <tibbs@math.uh.edu> writes:

> It's.... not a packaging problem.  Why should installing libidn pull in
> emacs?  In any case, there's a convenient emacs-libidn package in
> Fedora:

Thanks.  I now have idna support, but I'm not able to reproduce this
bug.  `eval' on the defcustom just returns t, as it should...

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



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

* Re: eval'ing message-use-idna defcustom hangs emacs
  2015-01-29 23:36       ` Lars Magne Ingebrigtsen
@ 2015-01-30  2:42         ` Eric Abrahamsen
  0 siblings, 0 replies; 7+ messages in thread
From: Eric Abrahamsen @ 2015-01-30  2:42 UTC (permalink / raw)
  To: Lars Magne Ingebrigtsen; +Cc: Jason L Tibbitts III, help-gnu-emacs, ding

Lars Magne Ingebrigtsen <lmi@gnus.org> writes:

> Jason L Tibbitts III <tibbs@math.uh.edu> writes:
>
>> It's.... not a packaging problem.  Why should installing libidn pull in
>> emacs?  In any case, there's a convenient emacs-libidn package in
>> Fedora:
>
> Thanks.  I now have idna support, but I'm not able to reproduce this
> bug.  `eval' on the defcustom just returns t, as it should...

I'm not seeing this anymore, either. I just removed the (setq ... nil)
I've had in place for ages, and the defcustom form now simply returns
nil (I don't have idna.el available in this emacs).

Mind you, this bug report is nearly a year old!



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

end of thread, other threads:[~2015-01-30  2:42 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-23  2:04 eval'ing message-use-idna defcustom hangs emacs Eric Abrahamsen
2015-01-28  6:12 ` Lars Ingebrigtsen
2015-01-28 15:32   ` Eli Zaretskii
2015-01-28 16:21     ` Dale Snell
2015-01-29 22:36     ` Jason L Tibbitts III
     [not found]     ` <mailman.18939.1422571379.1147.help-gnu-emacs@gnu.org>
2015-01-29 23:36       ` Lars Magne Ingebrigtsen
2015-01-30  2:42         ` Eric Abrahamsen

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