+2005-02-19 Yuuichi Teranishi <teranisi@gohome.org>
+
+ * elmo-maildir.el (elmo-folder-append-messages): Fix the problem
+ that only the first flag is used.
+
+2005-02-17 ARISAWA Akihiro <ari@mbf.sphere.ne.jp>
+
+ * elmo-shimbun.el (elmo-folder-exists-p): Use `shimbun-group-p'
+ if available.
+
+2005-02-17 Hiroya Murata <lapis-lazuli@pop06.odn.ne.jp>
+
+ * elmo-imap4.el (elmo-imap4-flags-to-imap): Preserve argument
+ `flags'.
+
+2005-02-16 Hiroya Murata <lapis-lazuli@pop06.odn.ne.jp>
+
+ * elmo-filter.el (elmo-message-set-cached): Call
+ `elmo-folder-notify-event' with event `cache-changed'.
+
+ * elmo-multi.el (elmo-message-set-cached): Ditto.
+
+ * elmo-pipe.el (elmo-message-set-cached): Ditto.
+
+2005-02-16 Yoichi NAKAYAMA <yoichi@geiin.org>
+
+ * elmo.el (elmo-folder-encache): Abolish.
+
+2005-02-16 Yuuichi Teranishi <teranisi@gohome.org>
+
+ * elmo-dop.el (elmo-folder-delete-messages-dop): Delete 'Append' queue.
+ (elmo-folder-next-message-number-dop): Return appropriate negative
+ integer.
+
+2005-02-15 Yoichi NAKAYAMA <yoichi@geiin.org>
+
+ * elmo-dop.el (elmo-dop-queue-flush): Remove files in dop spool on
+ clearing pending operations.
+ (elmo-folder-next-message-number-dop): Return appropriate negative
+ integer.
+
2005-02-11 Hiroya Murata <lapis-lazuli@pop06.odn.ne.jp>
* elmo-multi.el (elmo-multi-folder-diff): Fixed problem when the
(not elmo-dop-flush-confirm) t)
(progn
(while queue
+ (when (eq (elmo-dop-queue-method (car queue))
+ 'elmo-folder-append-buffer-dop-delayed)
+ (elmo-folder-delete-messages
+ (elmo-dop-spool-folder
+ (elmo-make-folder (elmo-dop-queue-fname (car queue))))
+ (list (nth 1 (elmo-dop-queue-arguments (car queue))))))
(setq elmo-dop-queue (delq (car queue) elmo-dop-queue))
(setq queue (cdr queue)))
(message "Pending operations are cleared.")
queue)
(dolist (number numbers)
(if (< number 0)
- (elmo-folder-delete-messages spool-folder
- (list (abs number))) ; delete from queue
+ (progn
+ ;; delete from queue
+ (elmo-folder-delete-messages spool-folder
+ (list (abs number)))
+ (dolist (queue elmo-dop-queue)
+ (when (and (eq (elmo-dop-queue-fname queue)
+ (elmo-folder-name-internal folder))
+ (eq (elmo-dop-queue-method queue)
+ 'elmo-folder-append-buffer-dop-delayed)
+ (eq (abs number)
+ (nth 1 (elmo-dop-queue-arguments queue))))
+ (setq elmo-dop-queue (delq queue elmo-dop-queue)))))
(setq queue (cons number queue))))
(when queue
(elmo-dop-queue-append folder 'elmo-folder-delete-messages-dop-delayed
(cons (+ max-num spool-length) (+ (length number-list) spool-length))))
(defun elmo-folder-next-message-number-dop (folder)
- (let ((number-list (elmo-folder-list-messages folder nil 'in-msgdb))
- (spool-folder (elmo-dop-spool-folder folder))
- spool-length
- max-num)
- (setq spool-length (or (if (elmo-folder-exists-p spool-folder)
- (car (elmo-folder-status spool-folder)))
- 0))
- (setq max-num (if number-list (apply #'max number-list) 0))
- (+ max-num spool-length)))
+ (let ((spool-folder (elmo-dop-spool-folder folder)))
+ (- (+ 1 (elmo-max-of-list (or (elmo-folder-list-messages
+ spool-folder)
+ '(0)))))))
;;; Delayed operation (executed at online status).
(defun elmo-folder-append-buffer-dop-delayed (folder flag number set-number)
(luna-define-method elmo-message-set-cached ((folder elmo-filter-folder)
number cached)
(elmo-message-set-cached
- (elmo-filter-folder-target-internal folder) number cached))
+ (elmo-filter-folder-target-internal folder) number cached)
+ (elmo-folder-notify-event folder 'cache-changed number))
(luna-define-method elmo-message-number ((folder elmo-filter-folder)
message-id)
(defun elmo-imap4-flags-to-imap (flags)
"Convert FLAGS to the IMAP flag string."
- (let ((imap-flag (if (not (memq 'unread flags)) "\\Seen"))
- (flags (delq 'read (delq 'cached (delq 'unread flags))))
- spec)
+ (let ((imap-flag (if (not (memq 'unread flags)) "\\Seen")))
(dolist (flag flags)
- (setq imap-flag (concat imap-flag (if imap-flag " ")
- (or (car (cdr (assq flag elmo-imap4-flag-specs)))
- (capitalize (symbol-name flag))))))
+ (unless (memq flag '(new read unread cached))
+ (setq imap-flag
+ (concat imap-flag
+ (if imap-flag " ")
+ (or (car (cdr (assq flag elmo-imap4-flag-specs)))
+ (capitalize (symbol-name flag)))))))
imap-flag))
(luna-define-method elmo-folder-append-buffer
(succeeds numbers)
filename flags id)
(dolist (number numbers)
- (setq flags (elmo-message-flags src-folder (car numbers))
+ (setq flags (elmo-message-flags src-folder number))
filename (elmo-maildir-temporal-filename dir))
(elmo-copy-file
(elmo-message-file-name src-folder number)
dir))
;; src folder's msgdb is loaded.
(when (setq id (and src-msgdb-exists
- (elmo-message-field src-folder (car numbers)
+ (elmo-message-field src-folder number
'message-id)))
(elmo-flag-table-set table id flags))
(elmo-progress-notify 'elmo-folder-move-messages))
(luna-define-method elmo-message-set-cached ((folder elmo-multi-folder)
number cached)
(let ((pair (elmo-multi-real-folder-number folder number)))
- (elmo-message-set-cached (car pair) (cdr pair) cached)))
+ (elmo-message-set-cached (car pair) (cdr pair) cached))
+ (elmo-folder-notify-event folder 'cache-changed number))
(luna-define-method elmo-find-fetch-strategy ((folder elmo-multi-folder)
number
(luna-define-method elmo-message-set-cached ((folder elmo-pipe-folder)
number cached)
(elmo-message-set-cached (elmo-pipe-folder-dst-internal folder)
- number cached))
+ number cached)
+ (elmo-folder-notify-event folder 'cache-changed number))
(luna-define-method elmo-find-fetch-strategy ((folder elmo-pipe-folder)
number
(luna-define-method elmo-folder-exists-p ((folder elmo-shimbun-folder))
(if (elmo-shimbun-folder-group-internal folder)
- (progn
+ (if (fboundp 'shimbun-group-p)
+ (shimbun-group-p (elmo-shimbun-folder-shimbun-internal folder)
+ (elmo-shimbun-folder-group-internal folder))
(member
(elmo-shimbun-folder-group-internal folder)
- (shimbun-groups (elmo-shimbun-folder-shimbun-internal
- folder))))
+ (shimbun-groups (elmo-shimbun-folder-shimbun-internal folder))))
t))
(luna-define-method elmo-folder-delete-messages ((folder elmo-shimbun-folder)
((folder elmo-folder) &optional visible-only)
t)
-(defun elmo-folder-encache (folder numbers &optional unread)
- "Encache messages in the FOLDER with NUMBERS.
-If UNREAD is non-nil, messages are not flaged as read."
- (dolist (number numbers)
- (elmo-message-encache folder number unread)))
-
(luna-define-generic elmo-message-encache (folder number &optional read)
"Encache message in the FOLDER with NUMBER.
If READ is non-nil, message is flaged as read.")