Function: nnfeed-request-article
nnfeed-request-article is a byte-compiled function defined in
nnfeed.el.gz.
Signature
(nnfeed-request-article ARTICLE &optional GROUP SERVER TO-BUFFER)
Source Code
;; Defined in /usr/src/emacs/lisp/gnus/nnfeed.el.gz
(deffoo nnfeed-request-article (article &optional group server to-buffer)
(if-let ((server (or server (nnfeed--current-server-no-prefix)))
(g (or (nnfeed--group-data group server)
(and (setq group nnfeed-group)
`[ nil ,nnfeed-group-article-ids
,nnfeed-group-articles
,nnfeed-group-article-max-num
,nnfeed-group-article-min-num nil])))
(num (or (and (stringp article)
(gethash article (aref g 1)))
(and (numberp article) article)))
((and (<= num (aref g 3))
(>= num (aref g 4))))
(a (gethash num (aref g 2))))
(with-current-buffer (or to-buffer nntp-server-buffer)
(erase-buffer)
(let* ((links (aref a 5))
(parts (aref a 6))
(headers (aref a 7))
(boundary (or (cdr (assq :boundary headers))
(format "-_%s_-" nnfeed-backend)))
(multi (length> parts 1))
(mime '( Content-Type Content-Disposition
Content-Transfer-Encoding)))
(insert (format
"Subject: %s\nFrom: %s\nDate: %s\nMessage-ID: %s\n"
(aref a 2) (aref a 1)
(format-time-string
nnfeed-date-format (or (aref a 3) '(0 0)))
(aref a 0))
(if (assq 'MIME-Version headers) "" "MIME-Version: 1.0\n")
(mapconcat (lambda (header)
(unless (keywordp (car header))
(format "%s: %s\n" (car header) (cdr header))))
headers)
(if multi
(if (assq 'Content-Type headers) ""
(format
"Content-Type: multipart/alternative; boundary=%s\n"
boundary))
(prog1 (nnfeed--print-part
(caar parts) (cdar parts) mime links)
(setq parts nil)))
(mapconcat (lambda (part)
(format "--%s\n%s\n" boundary
(nnfeed--print-part
(car part) (cdr part) mime links)))
parts)
(if multi (format "--%s--" boundary) "\n")))
`(,group . ,num))
(nnheader-report nnfeed-backend "No such article")))