2001-09-11 Yuuichi Teranishi <teranisi@gohome.org>
+ * elmo-pop3.el (elmo-pop3-list-location): Sort locations
+ by original number.
+ (elmo-folder-status): Call `elmo-folder-open-internal';
+ Call `elmo-folder-close-internal' instead of `elmo-folder-close'.
+ (elmo-folder-close-internal): Set location-alist as nil.
+ (elmo-folder-clear): Define.
+ (elmo-folder-check): Don't set location-alist as nil.
+
* elmo-dop.el (elmo-dop-queue-method-name-alist): Fixed symbols.
2001-09-10 Yuuichi Teranishi <teranisi@gohome.org>
(with-current-buffer (process-buffer
(elmo-network-session-process-internal
(elmo-pop3-get-session folder)))
- (let (list)
+ (let (locations)
(if elmo-pop3-uidl-done
(progn
(mapatoms
(lambda (atom)
- (setq list (cons (symbol-name atom) list)))
+ (setq locations (cons (symbol-name atom) locations)))
elmo-pop3-uidl-number-hash)
- (nreverse list))
+ (sort locations
+ (lambda (loc1 loc2)
+ (< (elmo-pop3-uidl-to-number loc1)
+ (elmo-pop3-uidl-to-number loc2)))))
(error "POP3: Error in UIDL")))))
(defun elmo-pop3-list-folder-by-location (folder locations)
(elmo-pop3-folder-list-messages folder))
(luna-define-method elmo-folder-status ((folder elmo-pop3-folder))
+ (elmo-folder-open-internal folder)
(elmo-folder-check folder)
(if (elmo-pop3-folder-use-uidl-internal folder)
(prog1
(elmo-pop3-list-by-uidl-subr folder 'nonsort)
- (elmo-folder-close folder))
+ (elmo-folder-close-internal folder))
(let* ((process
(elmo-network-session-process-internal
(elmo-pop3-get-session folder)))
(setq total
(string-to-int
(substring response (match-beginning 1)(match-end 1 ))))
- (elmo-folder-close folder)
+ (elmo-folder-close-internal folder)
(cons total total))))))
(defvar elmo-pop3-header-fetch-chop-length 200)
(defun elmo-pop3-sort-msgdb-by-original-number (folder msgdb)
(message "Sorting...")
(let ((overview (elmo-msgdb-get-overview msgdb)))
- (current-buffer)
(setq overview (elmo-pop3-sort-overview-by-original-number
overview
(elmo-pop3-folder-location-alist-internal folder)))
folder))))
(luna-define-method elmo-folder-close-internal ((folder elmo-pop3-folder))
+ (elmo-pop3-folder-set-location-alist-internal folder nil)
+ ;; Just close connection
(elmo-folder-check folder))
(luna-define-method elmo-message-fetch-plugged ((folder elmo-pop3-folder)
(and (elmo-folder-persistent-internal folder)
(elmo-pop3-folder-use-uidl-internal folder)))
+(luna-define-method elmo-folder-clear :around ((folder elmo-pop3-folder)
+ &optional keep-killed)
+ (unless keep-killed
+ (elmo-pop3-folder-set-location-alist-internal folder nil))
+ (luna-call-next-method))
+
(luna-define-method elmo-folder-check ((folder elmo-pop3-folder))
(if (elmo-folder-plugged-p folder)
(let ((session (elmo-pop3-get-session folder 'if-exists)))
(when session
- (elmo-pop3-folder-set-location-alist-internal folder nil)
(elmo-network-close-session session)))))
(require 'product)