(eval-when-compile
(require 'cl))
+(require 'nnheader)
+(require 'gnus-util)
+(require 'gnus)
+(require 'nnoo)
(require 'netrc)
(nnoo-declare nnimap)
(deffoo nnimap-request-group (group &optional server dont-check info)
(with-current-buffer nntp-server-buffer
(let ((result (nnimap-possibly-change-group group server))
- articles active marks)
+ articles active marks high low)
(when result
(if (and dont-check
(setq active (nth 2 (assoc group nnimap-current-infos))))
(nnimap-parse-flags
(list (list group-sequence flag-sequence 1 group)))))
(when info
- (nnimap-update-infos marks (list info)))))
+ (nnimap-update-infos marks (list info)))
+ (goto-char (point-max))
+ (cond
+ (marks
+ (setq high (nth 3 (car marks))
+ low (nth 4 (car marks))))
+ ((re-search-backward "UIDNEXT \\([0-9]+\\)" nil t)
+ (setq high (string-to-number (match-string 1))
+ low 1)))))
(erase-buffer)
- (let ((high (nth 3 (car marks)))
- (low (nth 4 (car marks))))
- (insert
- (format
- "211 %d %d %d %S\n"
- (1+ (- high low))
- low high group))))
- t))))
+ (insert
+ (format
+ "211 %d %d %d %S\n"
+ (1+ (- high low))
+ low high group))))
+ t)))
(defun nnimap-get-flags (spec)
(let ((articles nil)
(when (and old-marks
(> start-article 1))
(setq old-marks (gnus-range-difference
- (cons start-article high)
- old-marks))
+ old-marks
+ (cons start-article high)))
(setq new-marks (gnus-range-nconcat old-marks new-marks)))
(when new-marks
(push (cons (car type) new-marks) marks)))