elmo-inhibit-display-retrieval-progress as t while moving messages.
* elmo-vars.el (elmo-display-retrieval-progress-threshold):
New variable.
(elmo-inhibit-display-retrieval-progress): Ditto.
* elmo-pop3.el (elmo-pop3-process-filter): Use elmo-display-progress
for retrieval progress;
Don't display progress when total buffer size is smaller than
elmo-display-retrieval-progress-threshold.
(elmo-message-fetch-plugged): Don't display progress when
elmo-inhibit-display-retrieval-progress is non-nil.
* elmo-imap4.el (elmo-imap4-find-next-line): Use elmo-display-progress
for retrieval progress;
Don't display progress when literal size is smaller than
elmo-display-retrieval-progress-threshold.
(elmo-imap4-message-fetch): Don't display progress when
elmo-inhibit-display-retrieval-progress is non-nil.
+2001-06-10 Yuuichi Teranishi <teranisi@gohome.org>
+
+ * elmo.el (elmo-folder-move-messages): Bind
+ elmo-inhibit-display-retrieval-progress as t while moving messages.
+
+ * elmo-vars.el (elmo-display-retrieval-progress-threshold):
+ New variable.
+ (elmo-inhibit-display-retrieval-progress): Ditto.
+
+ * elmo-pop3.el (elmo-pop3-process-filter): Use elmo-display-progress
+ for retrieval progress;
+ Don't display progress when total buffer size is smaller than
+ elmo-display-retrieval-progress-threshold.
+ (elmo-message-fetch-plugged): Don't display progress when
+ elmo-inhibit-display-retrieval-progress is non-nil.
+
+ * elmo-imap4.el (elmo-imap4-find-next-line): Use elmo-display-progress
+ for retrieval progress;
+ Don't display progress when literal size is smaller than
+ elmo-display-retrieval-progress-threshold.
+ (elmo-imap4-message-fetch): Don't display progress when
+ elmo-inhibit-display-retrieval-progress is non-nil.
+
2001-06-07 Yuuichi Teranishi <teranisi@gohome.org>
* elmo-imap4.el (elmo-imap4-display-literal-progress): New variable.
(if (match-string 1)
(if (< (point-max) (+ (point) (string-to-number (match-string 1))))
(progn
- (if elmo-imap4-display-literal-progress
- (message "Retrieving...(%d/%d bytes)"
+ (if (and elmo-imap4-display-literal-progress
+ (> (string-to-number (match-string 1))
+ elmo-display-retrieval-progress-threshold))
+ (elmo-display-progress
+ 'elmo-display-retrieval-progress
+ (format "Retrieving (%d/%d bytes)..."
(- (point-max) (point))
- (string-to-number (match-string 1))))
+ (string-to-number (match-string 1)))
+ (floor (* (/ (float (- (point-max) (point)))
+ (string-to-number (match-string 1))) 100))))
nil)
(goto-char (+ (point) (string-to-number (match-string 1))))
(elmo-imap4-find-next-line))
(with-current-buffer (elmo-network-session-buffer session)
(setq elmo-imap4-fetch-callback nil)
(setq elmo-imap4-fetch-callback-data nil))
- (setq elmo-imap4-display-literal-progress t)
+ (unless elmo-inhibit-display-retrieval-progress
+ (setq elmo-imap4-display-literal-progress t))
(unwind-protect
(setq response
(elmo-imap4-send-command-wait session
(or section "")
)))
(setq elmo-imap4-display-literal-progress nil))
- (message "Retrieving...done.")
+ (unless elmo-inhibit-display-retrieval-progress
+ (elmo-display-progress 'elmo-imap4-display-literal-progress
+ ""
+ 100) ; remove progress bar.
+ (message "Retrieving...done."))
(if (setq response (elmo-imap4-response-bodydetail-text
(elmo-imap4-response-value-all
response 'fetch)))
(set-buffer (process-buffer process))
(goto-char (point-max))
(insert output)
- (if elmo-pop3-total-size
- (message "Retrieving...(%d/%d bytes)."
- (buffer-size) elmo-pop3-total-size))))
+ (if (and elmo-pop3-total-size
+ (> elmo-pop3-total-size
+ elmo-display-retrieval-progress-threshold))
+ (elmo-display-progress
+ 'elmo-display-retrieval-progress
+ (format "Retrieving (%d/%d bytes)..."
+ (buffer-size)
+ elmo-pop3-total-size)
+ (floor (* (/ (float (buffer-size))
+ elmo-pop3-total-size) 100))))))
(defun elmo-pop3-auth-user (session)
(let ((process (elmo-network-session-process-internal session)))
(when number
(elmo-pop3-send-command process
(format "retr %s" number))
- (setq elmo-pop3-total-size size)
- (message "Retrieving...")
+ (unless elmo-inhibit-display-retrieval-progress
+ (setq elmo-pop3-total-size size)
+ (elmo-display-progress
+ 'elmo-pop3-display-retrieval-progress
+ (format "Retrieving (0/%d bytes)..." elmo-pop3-total-size)))
(unwind-protect
(progn
(when (null (setq response (elmo-pop3-read-response
(error "Fetching message failed"))
(setq response (elmo-pop3-read-body process outbuf)))
(setq elmo-pop3-total-size nil))
- (message "Retrieving...done.")
+ (unless elmo-inhibit-display-retrieval-progress
+ (message "Retrieving...done."))
(set-buffer outbuf)
(goto-char (point-min))
(while (re-search-forward "^\\." nil t)
(defvar elmo-inhibit-number-mapping nil
"Global switch to inhibit number mapping (e.g. Inhibit UIDL on POP3).")
+(defvar elmo-display-retrieval-progress-threshold 30000
+ "*Don't display progress if the message size is smaller than this value.")
+
+(defvar elmo-inhibit-display-retrieval-progress nil
+ "Global switch to inhibit display progress of each message's retrieval.")
+
(defvar elmo-dop-queue nil
"Global variable for storing disconnected operation queues.")
save-unread)
(save-excursion
(let* ((messages msgs)
+ (elmo-inhibit-display-retrieval-progress t)
(len (length msgs))
(all-msg-num (or all len))
(done-msg-num (or done 0))