- ;; Send HEAD commands.
- (while articles
- (elmo-pop3-send-command process (format
- "top %s 0" (car articles))
- 'no-erase)
-;;; (accept-process-output process 1)
- (setq articles (cdr articles))
- (setq count (1+ count))
- ;; Every 200 requests we have to read the stream in
- ;; order to avoid deadlocks.
- (when (or elmo-pop3-send-command-synchronously
- (null articles) ;All requests have been sent.
- (zerop (% count elmo-pop3-header-fetch-chop-length)))
- (unless elmo-pop3-send-command-synchronously
- (accept-process-output process 1))
- (discard-input)
- (while (progn
- (goto-char last-point)
- ;; Count replies.
- (while (elmo-pop3-next-result-arrived-p)
- (setq last-point (point))
- (setq received (1+ received)))
- (< received count))
- (when (> number elmo-display-progress-threshold)
- (if (or (zerop (% received 5)) (= received number))
- (elmo-display-progress
- 'elmo-pop3-retrieve-headers "Getting headers..."
- (/ (* received 100) number))))
- (accept-process-output process 1)
-;;; (accept-process-output process)
- (discard-input))))
+ (elmo-with-progress-display (elmo-retrieve-header (length articles))
+ "Getting headers"
+ ;; Send HEAD commands.
+ (while articles
+ (elmo-pop3-send-command process
+ (format "top %s 0" (car articles))
+ 'no-erase)
+;;; (accept-process-output process 1)
+ (setq articles (cdr articles))
+ (setq count (1+ count))
+ ;; Every 200 requests we have to read the stream in
+ ;; order to avoid deadlocks.
+ (when (or elmo-pop3-send-command-synchronously
+ (null articles) ;All requests have been sent.
+ (zerop (% count elmo-pop3-header-fetch-chop-length)))
+ (unless elmo-pop3-send-command-synchronously
+ (accept-process-output process 1))
+ (discard-input)
+ (while (progn
+ (goto-char last-point)
+ ;; Count replies.
+ (while (elmo-pop3-next-result-arrived-p)
+ (setq last-point (point))
+ (setq received (1+ received)))
+ (< received count))
+ (elmo-progress-notify 'elmo-retrieve-header :set received)
+ (accept-process-output process 1)
+;;; (accept-process-output process)
+ (discard-input)))))