;;; pop3.el --- Post Office Protocol (RFC 1460) interface
-;; Copyright (C) 1996-2011 Free Software Foundation, Inc.
+;; Copyright (C) 1996-2012 Free Software Foundation, Inc.
;; Author: Richard L. Pieri <ratinox@peorth.gweep.net>
;; Maintainer: FSF
(unless (memq (process-status process) '(open run))
(error "pop3 process died"))
(when total-size
- (message "pop3 retrieved %dKB (%d%%)"
- (truncate (/ (buffer-size) 1000))
- (truncate (* (/ (* (buffer-size) 1.0)
- total-size) 100))))
+ (let ((size 0))
+ (goto-char (point-min))
+ (while (re-search-forward "^\\+OK.*\n" nil t)
+ (setq size (+ size (- (point))
+ (if (re-search-forward "^\\.\r?\n" nil 'move)
+ (match-beginning 0)
+ (point)))))
+ (message "pop3 retrieved %dKB (%d%%)"
+ (truncate (/ size 1000))
+ (truncate (* (/ (* size 1.0) total-size) 100)))))
(pop3-accept-process-output process))
start-point)
message-count))
(defcustom pop3-stream-type nil
- "*Transport security type for POP3 connexions.
-This may be either nil (plain connexion), `ssl' (use an
+ "*Transport security type for POP3 connections.
+This may be either nil (plain connection), `ssl' (use an
SSL/TSL-secured stream) or `starttls' (use the starttls mechanism
to turn on TLS security after opening the stream). However, if
-this is nil, `ssl' is assumed for connexions to port
+this is nil, `ssl' is assumed for connections to port
995 (pop3s)."
:version "23.1" ;; No Gnus
:group 'pop3