+2001-06-11 Yuuichi Teranishi <teranisi@gohome.org>
+
+ * elmo2.el (elmo-move-msgs): 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-pop3-read-msg): Don't display progress when
+ elmo-inhibit-display-retrieval-progress is non-nil;
+ Remove progress bar after retrieval.
+
+ * 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-read-msg): Don't display progress when
+ elmo-inhibit-display-retrieval-progress is non-nil;
+ Remove progress bar after retrieval.
+ * elmo-imap4.el (elmo-imap4-read-part): Ditto.
+
2001-06-07 Yuuichi Teranishi <teranisi@gohome.org>
* elmo-imap4.el (elmo-imap4-display-literal-progress): New variable.
elmo-imap4-status-callback-data
elmo-imap4-current-msgdb))
+(defvar elmo-imap4-display-literal-progress nil)
;;;;
(defconst elmo-imap4-quoted-specials-list '(?\\ ?\"))
(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))
(prog1
(unwind-protect
(elmo-delete-cr
msg part))
'fetch)))
(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.")))))
(defun elmo-imap4-prefetch-msg (spec msg outbuf)
(elmo-imap4-read-msg spec msg outbuf nil 'unseen))
(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
(if leave-seen-flag-untouched
".peek" ""))))
(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."))
(and (setq response (elmo-imap4-response-bodydetail-text
(elmo-imap4-response-value-all
response 'fetch )))
(defvar elmo-imap4-client-eol "\r\n"
"The EOL string we send to the server.")
-(defvar elmo-imap4-display-literal-progress nil)
-
(defun elmo-imap4-find-next-line ()
"Return point at end of current line, taking into account literals.
Return nil if no complete line has arrived."
(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))
+ (min elmo-display-retrieval-progress-threshold 100)))
+ (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)))
+ (/ (- (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))
(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)
+ 0))
(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
+ (elmo-display-progress
+ 'elmo-display-retrieval-progress "" 100) ; remove progress bar.
+ (message "Retrieving...done."))
(set-buffer outbuf)
(goto-char (point-min))
(while (re-search-forward "^\\." nil t)