* elmo-localdir.el (elmo-localdir-list-folder-subr): Fix.
* elmo-maildir.el (elmo-maildir-list-folder-subr): Fix.
* elmo-archive.el (elmo-archive-list-folder-subr): Fix.
* elmo-internal.el (elmo-internal-list-folder-subr): Fix.
* elmo-imap4.el (elmo-imap4-max-of-folder): Fix.
+2000-10-17 Kenichi OKADA <okada@opaopa.org>
+
+ * elmo-msgdb.el (elmo-msgdb-killed-list-length): New function.
+ * elmo-localdir.el (elmo-localdir-list-folder-subr): Fix.
+ * elmo-maildir.el (elmo-maildir-list-folder-subr): Fix.
+ * elmo-archive.el (elmo-archive-list-folder-subr): Fix.
+ * elmo-internal.el (elmo-internal-list-folder-subr): Fix.
+ * elmo-imap4.el (elmo-imap4-max-of-folder): Fix.
+
2000-10-17 Akihiro MOTOKI <motoki@da.jp.nec.com>
* elmo-msgdb.el (elmo-msgdb-search-internal-primitive): Search by
(if nonsort
(cons (or (elmo-max-of-list file-list) 0)
(if killed
- (- (length file-list) (length killed))
+ (- (length file-list)
+ (elmo-msgdb-killed-list-length killed))
(length file-list)))
(setq numbers (sort file-list '<))
(elmo-living-messages numbers killed))))
(defun elmo-imap4-max-of-folder (spec)
(let ((session (elmo-imap4-get-session spec))
+ (killed (and elmo-use-killed-list
+ (elmo-msgdb-killed-list-load
+ (elmo-msgdb-expand-path spec))))
status)
(with-current-buffer (elmo-network-session-buffer session)
(setq elmo-imap4-status-callback nil)
'status))
(cons
(- (elmo-imap4-response-value status 'uidnext) 1)
- (elmo-imap4-response-value status 'messages))))
+ (if killed
+ (-
+ (elmo-imap4-response-value status 'messages)
+ (elmo-msgdb-killed-list-length killed))
+ (elmo-imap4-response-value status 'messages)))))
(defun elmo-imap4-folder-diff (spec folder &optional number-list)
(if elmo-use-server-diff
(if nonsort
(cons (or (elmo-max-of-list flist) 0)
(if killed
- (- (length flist) (length killed))
+ (- (length flist)
+ (elmo-msgdb-killed-list-length killed))
(length flist)))
(setq numbers (sort flist '<))
(elmo-living-messages numbers killed))))
(if nonsort
(cons (or (elmo-max-of-list flist) 0)
(if killed
- (- (length flist) (length killed))
+ (- (length flist)
+ (elmo-msgdb-killed-list-length killed))
(length flist)))
(setq numbers (sort flist '<))
(elmo-living-messages numbers killed))))
(cons (+ (or (elmo-max-of-list flist) 0) (length news))
(+ (length news)
(if killed
- (- (length flist) (length killed))
+ (- (length flist)
+ (elmo-msgdb-killed-list-length killed))
(length flist))))
(setq numbers (sort flist '<))
(elmo-living-messages numbers killed))))
(elmo-msgdb-killed-list-load dir)
msgs))))
+(defun elmo-msgdb-killed-list-length (killed-list)
+ (let ((killed killed-list)
+ (ret-val 0))
+ (while (car killed)
+ (if (consp (car killed))
+ (setq ret-val (+ ret-val 1 (- (cdar killed) (caar killed))))
+ (setq ret-val (+ ret-val 1)))
+ (setq killed (cdr killed)))
+ ret-val))
+
(defun elmo-living-messages (messages killed-list)
(if killed-list
(delq nil