Eric Abrahamsen
2014-04-23 02:04:50 UTC
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
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