+2002-05-19 Yuuichi Teranishi <teranisi@gohome.org>
+
+ * elmo-util.el (elmo-disk-usage): Return 0 if invalid file attribute.
+
+ * elmo-msgdb.el (elmo-msgdb-create-overview-from-buffer): Avoid
+ changing default value of default-mime-charset.
+ (elmo-msgdb-create-overview-from-buffer): Remove TAB character.
+
+ * elmo-imap4.el (elmo-folder-open): Fixed NO response check.
+
+ * elmo-dop.el (elmo-dop-queue-merge-method-list): New variable.
+ (elmo-dop-queue-merge): Use elmo-dop-queue-merge-method-list
+ instead of elmo-dop-queue-method-name-alist to check merging queue.
+ (elmo-folder-delete-messages-dop): Delete from queue if negative
+ message number.
+ (elmo-folder-append-buffer-dop-delayed): Treat as success if queue
+ file is already removed.
+
2002-05-10 Katsumi Yamaoka <yamaoka@jpl.org>
* elmo-vars.el: Bind colon keywords for old Emacsen.
method arguments)))
(setq elmo-dop-queue (nconc elmo-dop-queue (list queue)))))
+(defvar elmo-dop-queue-merge-method-list
+ '(elmo-folder-mark-as-read
+ elmo-folder-unmark-read
+ elmo-folder-mark-as-important
+ elmo-folder-unmark-important))
+
(defvar elmo-dop-queue-method-name-alist
'((elmo-folder-append-buffer-dop-delayed . "Append")
(elmo-folder-delete-messages-dop-delayed . "Delete")
new-queue match-queue que)
(while (setq que (car queue))
(if (and
- (assq (elmo-dop-queue-method que)
- elmo-dop-queue-method-name-alist)
+ (memq (elmo-dop-queue-method que)
+ elmo-dop-queue-merge-method-list)
(setq match-queue
- (car (delete nil
- (mapcar '(lambda (nqueue)
- (if (and
- (string= (elmo-dop-queue-fname que)
- (elmo-dop-queue-fname nqueue))
- (string= (elmo-dop-queue-method que)
- (elmo-dop-queue-method nqueue)))
- nqueue))
- new-queue)))))
- (setcar (elmo-dop-queue-arguments match-queue)
- (append (car (elmo-dop-queue-arguments match-queue))
- (car (elmo-dop-queue-arguments que))))
+ (car (delete
+ nil
+ (mapcar
+ (lambda (nqueue)
+ (if (and
+ (string= (elmo-dop-queue-fname que)
+ (elmo-dop-queue-fname nqueue))
+ (string= (elmo-dop-queue-method que)
+ (elmo-dop-queue-method nqueue)))
+ nqueue))
+ new-queue)))))
+ (setcar (elmo-dop-queue-arguments match-queue)
+ (append (car (elmo-dop-queue-arguments match-queue))
+ (car (elmo-dop-queue-arguments que))))
(setq new-queue (nconc new-queue (list que))))
(setq queue (cdr queue)) )
(setq elmo-dop-queue new-queue)))
number)))
(defsubst elmo-folder-delete-messages-dop (folder numbers)
- (elmo-dop-queue-append folder 'elmo-folder-delete-messages-dop-delayed
- (list
- (mapcar
- (lambda (number)
- (cons number (elmo-message-field
- folder number 'message-id)))
- numbers)))
- t)
+ (let ((spool-folder (elmo-dop-spool-folder folder))
+ queue)
+ (dolist (number numbers)
+ (if (< number 0)
+ (elmo-folder-delete-messages spool-folder
+ (list (abs number))) ; delete from queue
+ (setq queue (cons number queue))))
+ (when queue
+ (elmo-dop-queue-append folder 'elmo-folder-delete-messages-dop-delayed
+ (list
+ (mapcar
+ (lambda (number)
+ (cons number (elmo-message-field
+ folder number 'message-id)))
+ queue))))
+ t))
(defsubst elmo-message-encache-dop (folder number &optional read)
(elmo-dop-queue-append folder 'elmo-message-encache (list number read)))
;;; Delayed operation (executed at online status).
(defun elmo-folder-append-buffer-dop-delayed (folder unread number set-number)
(let ((spool-folder (elmo-dop-spool-folder folder))
- failure saved)
+ failure saved dequeued)
(with-temp-buffer
- (elmo-message-fetch spool-folder number
- (elmo-make-fetch-strategy 'entire)
- nil (current-buffer) 'unread)
- (condition-case nil
- (setq failure (not
- (elmo-folder-append-buffer folder unread set-number)))
- (error (setq failure t)))
+ (if (elmo-message-fetch spool-folder number
+ (elmo-make-fetch-strategy 'entire)
+ nil (current-buffer) 'unread)
+ (condition-case nil
+ (setq failure (not
+ (elmo-folder-append-buffer
+ folder unread set-number)))
+ (error (setq failure t)))
+ (setq dequeued t)) ; Already deletef from queue.
(when failure
;; Append failed...
(setq saved (elmo-folder-append-buffer
(elmo-make-folder elmo-lost+found-folder)
unread set-number)))
- (if (or (not failure)
- saved)
+ (if (and (not dequeued) ; if dequeued, no need to delete.
+ (or (not failure) ; succeed
+ saved)) ; in lost+found
(elmo-folder-delete-messages spool-folder (list number)))
t)))
Header region is supposed to be narrowed."
(save-excursion
(let ((extras elmo-msgdb-extra-fields)
+ (default-mime-charset default-mime-charset)
message-id references from subject to cc date
- default-mime-charset
extra field-body charset)
(elmo-set-buffer-multibyte default-enable-multibyte-characters)
(setq message-id (elmo-msgdb-get-message-id-from-buffer))
(elmo-field-body "in-reply-to"))
(elmo-msgdb-get-last-message-id
(elmo-field-body "references"))))
- (setq from (elmo-mime-string (elmo-delete-char
- ?\"
- (or
- (elmo-field-body "from")
- elmo-no-from)))
- subject (elmo-mime-string (or (elmo-field-body "subject")
- elmo-no-subject)))
+ (setq from (elmo-replace-in-string
+ (elmo-mime-string (or (elmo-field-body "from")
+ elmo-no-from))
+ "\t" " ")
+ subject (elmo-replace-in-string
+ (elmo-mime-string (or (elmo-field-body "subject")
+ elmo-no-subject))
+ "\t" " "))
(setq date (or (elmo-field-body "date") time))
(setq to (mapconcat 'identity (elmo-multiple-field-body "to") ","))
(setq cc (mapconcat 'identity (elmo-multiple-field-body "cc") ","))