(defvoo nnimap-stream 'ssl
"How nnimap will talk to the IMAP server.
-Values are `ssl' and `network'.")
+Values are `ssl', `network' or `shell'.")
(defvoo nnimap-shell-program (if (boundp 'imap-shell-program)
(if (listp imap-shell-program)
(match-string 1)))
(beginning-of-line)
(when (search-forward "BODYSTRUCTURE" (line-end-position) t)
- (let ((structure (ignore-errors (read (current-buffer)))))
+ (let ((structure (ignore-errors
+ (save-restriction
+ (narrow-to-region
+ (point) (line-end-position))
+ (read (current-buffer))))))
(while (and (consp structure)
(not (stringp (car structure))))
(setq structure (car structure)))
(when info
(nnimap-update-infos marks (list info)))
(goto-char (point-max))
- (cond
- (marks
- (let ((uidnext (nth 5 (car marks))))
- (setq high (or (nth 3 (car marks)) (1- uidnext))
- low (or (nth 4 (car marks)) uidnext))))
- ((re-search-backward "UIDNEXT \\([0-9]+\\)" nil t)
- (setq high (1- (string-to-number (match-string 1)))
- low 1)))))
+ (let ((uidnext (nth 5 (car marks))))
+ (setq high (if uidnext
+ (1- uidnext)
+ (nth 3 (car marks)))
+ low (or (nth 4 (car marks)) uidnext)))))
(erase-buffer)
(insert
(format
(let ((group (gnus-info-group info))
(completep (and start-article
(= start-article 1))))
+ (when uidnext
+ (setq high (1- uidnext)))
;; First set the active ranges based on high/low.
(if (or completep
(not (gnus-active group)))
(gnus-set-active group
- (if high
+ (if (and low high)
(cons low high)
;; No articles in this group.
(cons uidnext (1- uidnext))))
(new-marks
(gnus-compress-sequence
(cdr (or (assoc (caddr type) flags) ; %Flagged
+ (assoc (intern (cadr type) obarray) flags)
(assoc (cadr type) flags)))))) ; "\Flagged"
(setq marks (delq old-marks marks))
(pop old-marks)