2001-12-02 Kenichi OKADA <okada@opaopa.org>
+ * 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 <okada@opaopa.org>
+
* elmo-sendlog.el: New file.
* elmo-internal.el (elmo-internal-folder-list): Added 'sendlog.
(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."
(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
(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)
(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)))