From: okada Date: Sat, 1 Dec 2001 20:54:36 +0000 (+0000) Subject: * elmo-sendlog.el (elmo-folder-delete-messages): Added. X-Git-Tag: wl-2_8-root~105 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d8838bdec014f06e32343932cc1faa19ba82cc71;p=elisp%2Fwanderlust.git * elmo-sendlog.el (elmo-folder-delete-messages): Added. (elmo-map-message-fetch): Fix. * elmo-map.el (elmo-folder-status): Fix for killed. --- diff --git a/elmo/ChangeLog b/elmo/ChangeLog index 2663190..606b57e 100644 --- a/elmo/ChangeLog +++ b/elmo/ChangeLog @@ -1,5 +1,11 @@ 2001-12-02 Kenichi OKADA + * elmo-sendlog.el (elmo-folder-delete-messages): Added. + (elmo-map-message-fetch): Fix. + * elmo-map.el (elmo-folder-status): Fix for killed. + +2001-12-02 Kenichi OKADA + * elmo-sendlog.el: New file. * elmo-internal.el (elmo-internal-folder-list): Added 'sendlog. diff --git a/elmo/elmo-map.el b/elmo/elmo-map.el index 8b0656d..6391cf4 100644 --- a/elmo/elmo-map.el +++ b/elmo/elmo-map.el @@ -95,15 +95,19 @@ (luna-define-method elmo-folder-status ((folder elmo-map-folder)) (elmo-folder-open-internal folder) - (prog1 - (let ((numbers (mapcar - 'car - (elmo-map-folder-location-alist-internal folder)))) + (elmo-folder-set-killed-list-internal + folder + (elmo-msgdb-killed-list-load (elmo-folder-msgdb-path folder))) + (let ((numbers (mapcar + 'car + (elmo-map-folder-location-alist-internal folder)))) + (setq numbers (elmo-living-messages numbers (elmo-folder-killed-list-internal folder))) + (prog1 (cons (elmo-max-of-list numbers) - (length numbers))) - ;; Don't close after status. - (unless (elmo-folder-reserve-status-p folder) - (elmo-folder-close-internal folder)))) + (length numbers)) + ;; Don't close after status. + (unless (elmo-folder-reserve-status-p folder) + (elmo-folder-close-internal folder))))) (defun elmo-map-message-number (folder location) "Return number of the message in the FOLDER with LOCATION." diff --git a/elmo/elmo-nntp.el b/elmo/elmo-nntp.el index b210779..27e8e22 100644 --- a/elmo/elmo-nntp.el +++ b/elmo/elmo-nntp.el @@ -638,7 +638,7 @@ Don't cache if nil.") elmo-newsgroups-hashtb)) (progn (setq end-num (nth 2 entry)) - (when(and killed-list + (when (and killed-list (elmo-number-set-member end-num killed-list)) ;; Max is killed. (setq end-num nil)) diff --git a/elmo/elmo-sendlog.el b/elmo/elmo-sendlog.el index 6a41196..c92fb8b 100644 --- a/elmo/elmo-sendlog.el +++ b/elmo/elmo-sendlog.el @@ -96,7 +96,11 @@ (elmo-msgdb-create-overview-entity-from-file (car numbers) (elmo-message-file-name folder (car numbers)))) (if (null entity) - () + (elmo-folder-set-killed-list-internal + folder + (nconc + (elmo-folder-killed-list-internal folder) + (list (car numbers)))) (setq num (elmo-msgdb-overview-entity-get-number entity)) (setq overview (elmo-msgdb-append-element @@ -129,8 +133,10 @@ (luna-define-method elmo-map-message-fetch ((folder elmo-sendlog-folder) location strategy &optional section unseen) - (insert-file-contents-as-binary - (elmo-file-cache-get-path location))) + (let ((filename (elmo-file-cache-get-path location))) + (if (file-exists-p filename) + (insert-file-contents-as-binary filename) + (error "Now this message is not cached. Please s all")))) (luna-define-method elmo-folder-creatable-p ((folder elmo-sendlog-folder)) nil) @@ -141,6 +147,15 @@ (luna-define-method elmo-folder-exists-p ((folder elmo-sendlog-folder)) t) +(luna-define-method elmo-folder-delete-messages ((folder elmo-sendlog-folder) + numbers) + (let ((killed-list (elmo-folder-killed-list-internal folder))) + (dolist (number numbers) + (setq killed-list + (elmo-msgdb-set-as-killed killed-list number))) + (elmo-folder-set-killed-list-internal folder killed-list)) + t) + (luna-define-method elmo-folder-search ((folder elmo-sendlog-folder) condition &optional from-msgs) (let* ((msgs (or from-msgs (elmo-folder-list-messages folder)))