Function: nndiary-retrieve-headers
nndiary-retrieve-headers is a byte-compiled function defined in
nndiary.el.gz.
Signature
(nndiary-retrieve-headers SEQUENCE &optional GROUP SERVER FETCH-OLD)
Source Code
;; Defined in /usr/src/emacs/lisp/gnus/nndiary.el.gz
(deffoo nndiary-retrieve-headers (sequence &optional group server fetch-old)
(when (nndiary-possibly-change-directory group server)
(with-current-buffer nntp-server-buffer
(erase-buffer)
(let* ((file nil)
(number (length sequence))
(count 0)
(file-name-coding-system nnmail-pathname-coding-system)
beg article
(nndiary-check-directory-twice
(and nndiary-check-directory-twice
;; To speed up, disable it in some case.
(or (not (numberp nnmail-large-newsgroup))
(<= number nnmail-large-newsgroup)))))
(if (stringp (car sequence))
'headers
(if (nndiary-retrieve-headers-with-nov sequence fetch-old)
'nov
(while sequence
(setq article (car sequence))
(setq file (nndiary-article-to-file article))
(when (and file
(file-exists-p file)
(not (file-directory-p file)))
(insert (format "221 %d Article retrieved.\n" article))
(setq beg (point))
(nnheader-insert-head file)
(goto-char beg)
(if (search-forward "\n\n" nil t)
(forward-char -1)
(goto-char (point-max))
(insert "\n\n"))
(insert ".\n")
(delete-region (point) (point-max)))
(setq sequence (cdr sequence))
(setq count (1+ count))
(and (numberp nnmail-large-newsgroup)
(> number nnmail-large-newsgroup)
(zerop (% count 20))
(nnheader-message 6 "nndiary: Receiving headers... %d%%"
(floor (* count 100.0) number))))
(and (numberp nnmail-large-newsgroup)
(> number nnmail-large-newsgroup)
(nnheader-message 6 "nndiary: Receiving headers...done"))
(nnheader-fold-continuation-lines)
'headers))))))