Function: gnus-summary-idna-message
gnus-summary-idna-message is an interactive and byte-compiled function
defined in gnus-sum.el.gz.
Signature
(gnus-summary-idna-message &optional ARG)
Documentation
Decode IDNA encoded domain names in the current articles.
IDNA encoded domain names looks like xn--bar. If a string
remain unencoded after running this function, it is likely an
invalid IDNA string (xn--bar is invalid).
You must have GNU Libidn (URL https://www.gnu.org/software/libidn/) installed for this command to work.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/gnus/gnus-sum.el.gz
(defun gnus-summary-idna-message (&optional _arg)
"Decode IDNA encoded domain names in the current articles.
IDNA encoded domain names looks like `xn--bar'. If a string
remain unencoded after running this function, it is likely an
invalid IDNA string (`xn--bar' is invalid).
You must have GNU Libidn (URL `https://www.gnu.org/software/libidn/')
installed for this command to work."
(interactive nil gnus-summary-mode)
(gnus-summary-select-article)
(let ((mail-header-separator ""))
(gnus-eval-in-buffer-window gnus-article-buffer
(save-restriction
(widen)
(let ((start (window-start))
buffer-read-only)
(while (re-search-forward "\\(xn--[-0-9a-z]+\\)" nil t)
(replace-match (puny-decode-domain (match-string 1))))
(set-window-start (get-buffer-window (current-buffer)) start))))))