Function: nnimap-finish-retrieve-group-infos
nnimap-finish-retrieve-group-infos is a byte-compiled function defined
in nnimap.el.gz.
Signature
(nnimap-finish-retrieve-group-infos SERVER INFOS SEQUENCES &optional DONT-INSERT)
Source Code
;; Defined in /usr/src/emacs/lisp/gnus/nnimap.el.gz
(deffoo nnimap-finish-retrieve-group-infos (server infos sequences
&optional dont-insert)
(when (and sequences
(nnimap-change-group nil server t)
;; Check that the process is still alive.
(get-buffer-process (nnimap-buffer))
(memq (process-status (get-buffer-process (nnimap-buffer)))
'(open run)))
(with-current-buffer (nnimap-buffer)
;; Wait for the final data to trickle in.
(when (nnimap-wait-for-response (if (eq (cadar sequences) 'qresync)
(caar sequences)
(cadar sequences))
t)
;; Now we should have most of the data we need, no matter
;; whether we're QRESYNCING, fetching all the flags from
;; scratch, or just fetching the last 100 flags per group.
(nnimap-update-infos (nnimap-flags-to-marks
(nnimap-parse-flags
(nreverse sequences)))
infos)
(unless dont-insert
;; Finally, just return something resembling an active file in
;; the nntp buffer, so that the agent can save the info, too.
(with-current-buffer nntp-server-buffer
(erase-buffer)
(dolist (info infos)
(let* ((group (gnus-info-group info))
(active (gnus-active group)))
(when active
(insert (format "%S %d %d y\n"
(gnus-group-real-name group)
(cdr active)
(car active))))))))))))