+2010-09-19 Lars Magne Ingebrigtsen <larsi@gnus.org>
+
+ * nnimap.el (nnimap-finish-retrieve-group-infos): Return data in the
+ nntp buffer so the agent can save it.
+
2010-09-18 Julien Danjou <julien@danjou.info>
* gnus-html.el (gnus-html-schedule-image-fetching): Fetch all images in
(gnus-check-backend-function 'finish-retrieve-group-infos (car method))
(or (not (gnus-agent-method-p method))
(gnus-online method)))
- (gnus-finish-retrieve-group-infos method infos early-data))
+ (gnus-finish-retrieve-group-infos method infos early-data)
+ (gnus-agent-save-active method))
((gnus-check-backend-function 'retrieve-groups (car method))
(when (gnus-check-backend-function 'request-scan (car method))
(dolist (info infos)
article)))
(let ((buffer (nnimap-find-process-buffer (current-buffer))))
(when (car result)
- (with-current-buffer to-buffer
+ (with-current-buffer (or to-buffer nntp-server-buffer)
(insert-buffer-substring buffer)
(goto-char (point-min))
(let ((bytes (nnimap-get-length)))
(nnimap-update-infos (nnimap-flags-to-marks
(nnimap-parse-flags
(nreverse sequences)))
- infos))))
+ infos)
+ ;; 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)))
+ (insert (format "%S %d %d y\n"
+ (gnus-group-real-name group)
+ (cdr active)
+ (car active)))))))))
(defun nnimap-update-infos (flags infos)
(dolist (info infos)