+2003-08-30 Simon Josefsson <jas@extundo.com>
+
+ * mail-source.el (mail-source-fetch-imap): Pass correct buffer to
+ imap-open, reverts 2003-03-17 change. Reverse remove before
+ calling gnus-compress-sequence. From Gaute Strokkenes
+ <gs234@srcf.ucam.org> (tiny change).
+
2003-08-29 Simon Josefsson <jas@extundo.com>
* gnus-group.el (gnus-group-delete-group): Doc fix. Suggested by
(defun mail-source-fetch-imap (source callback)
"Fetcher for imap sources."
(mail-source-bind (imap source)
- (let* ((from (format "%s:%s:%s" server user port))
- (found 0)
- (buffer-name " *imap source*")
- (buf (get-buffer-create (generate-new-buffer-name buffer-name)))
- (mail-source-string (format "imap:%s:%s" server mailbox))
- (imap-shell-program (or (list program) imap-shell-program))
- remove)
- (if (and (imap-open server port stream authentication buffer-name)
+ (let ((from (format "%s:%s:%s" server user port))
+ (found 0)
+ (buf (generate-new-buffer " *imap source*"))
+ (mail-source-string (format "imap:%s:%s" server mailbox))
+ (imap-shell-program (or (list program) imap-shell-program))
+ remove)
+ (if (and (imap-open server port stream authentication buf)
(imap-authenticate
user (or (cdr (assoc from mail-source-password-cache))
password) buf)
(nnheader-ms-strip-cr))
(incf found (mail-source-callback callback server))
(when (and remove fetchflag)
+ (setq remove (nreverse remove))
(imap-message-flags-add
(imap-range-to-message-set (gnus-compress-sequence remove))
fetchflag nil buf))