Function: gnus-summary-refer-article
gnus-summary-refer-article is an interactive and byte-compiled
function defined in gnus-sum.el.gz.
Signature
(gnus-summary-refer-article MESSAGE-ID)
Documentation
Fetch an article specified by MESSAGE-ID.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/gnus/gnus-sum.el.gz
(defun gnus-summary-refer-article (message-id)
"Fetch an article specified by MESSAGE-ID."
(interactive "sMessage-ID: " gnus-summary-mode)
(when (and (stringp message-id)
(not (zerop (length message-id))))
(setq message-id (string-replace " " "" message-id))
;; Construct the correct Message-ID if necessary.
;; Suggested by tale@pawl.rpi.edu.
(unless (string-match "^<" message-id)
(setq message-id (concat "<" message-id)))
(unless (string-match ">$" message-id)
(setq message-id (concat message-id ">")))
;; People often post MIDs from URLs, so unhex it:
(unless (string-search "@" message-id)
(setq message-id (gnus-url-unhex-string message-id)))
(let* ((header (gnus-id-to-header message-id))
(sparse (and header
(gnus-summary-article-sparse-p
(mail-header-number header))
(memq (mail-header-number header)
gnus-newsgroup-limit)))
number)
(cond
;; If the article is present in the buffer we just go to it.
((and header
(or (not (gnus-summary-article-sparse-p
(mail-header-number header)))
sparse))
(prog1
(gnus-summary-goto-article
(mail-header-number header) nil t)
(when sparse
(gnus-summary-update-article (mail-header-number header)))))
(t
;; We fetch the article.
(catch 'found
(dolist (gnus-override-method (gnus-refer-article-methods))
(when (and (gnus-check-server gnus-override-method)
;; Fetch the header,
(setq number (gnus-summary-insert-subject message-id)))
;; and display the article.
(gnus-summary-select-article nil nil nil number)
(throw 'found t)))
(gnus-message 3 "Couldn't fetch article %s" message-id)))))))