+2003-09-19 Yuuichi Teranishi <teranisi@gohome.org>
+
+ * elmo.el (elmo-folder-delete-messages): Added notice in docstring.
+ (elmo-folder-move-messages): Call elmo-global-flag-detach-messages
+ with argument `delete-if-none' when dst-folder is 'null.
+
+ * elmo-flag.el (elmo-folder-append-messages): Defined.
+ (elmo-global-flag-detach-messages): Added argumnet `delete-if-none'.
+
2003-09-18 Yuuichi Teranishi <teranisi@gohome.org>
* elmo-flag.el (elmo-folder-initialize): Fixed ("/.minfo"->".minfo").
(message "Creating msgdb...done")
new-msgdb)))
+(luna-define-method elmo-folder-append-messages ((folder elmo-flag-folder)
+ src-folder
+ numbers
+ &optional same-number)
+ (dolist (number numbers)
+ (elmo-global-flag-set (elmo-flag-folder-flag-internal folder)
+ src-folder number (elmo-message-field
+ src-folder
+ number
+ 'message-id)))
+ numbers)
+
(luna-define-method elmo-folder-append-buffer ((folder elmo-flag-folder)
unread
&optional number)
(elmo-localdir-delete-message flag-folder (nth 2 elem))
(elmo-folder-commit flag-folder)))))))
-(defun elmo-global-flag-detach-messages (folder numbers)
+(defun elmo-global-flag-detach-messages (folder numbers &optional
+ delete-if-none)
"Detach all messages specified from all global flags.
FOLDER is the folder structure.
-NUMBERS is the message number list."
+NUMBERS is the message number list.
+If optional DELETE-IF-NONE is non-nil, delete message from flag folder when
+the message is not flagged in any folder."
(unless (eq (elmo-folder-type-internal folder) 'flag)
(dolist (flag elmo-global-flag-list)
(dolist (number numbers)
- (elmo-global-flag-detach flag folder number)))))
+ (elmo-global-flag-detach flag folder number delete-if-none)))))
;;; To migrate from global mark folder
(defvar elmo-global-mark-filename "global-mark"
(luna-define-generic elmo-folder-delete-messages (folder numbers)
"Delete messages.
FOLDER is the ELMO folder structure.
-NUMBERS is a list of message numbers to be deleted.")
+NUMBERS is a list of message numbers to be deleted.
+It is not recommended to use this function other than internal use.
+Use `elmo-folder-move-messages' with dst-folder 'null instead.")
(luna-define-generic elmo-folder-search (folder condition &optional numbers)
"Search and return list of message numbers.
(if (and (elmo-folder-delete-messages src-folder succeeds)
(elmo-folder-detach-messages src-folder succeeds))
(progn
- (elmo-global-flag-detach-messages src-folder succeeds)
+ (elmo-global-flag-detach-messages
+ src-folder succeeds (eq dst-folder 'null))
(setq result t))
(message "move: delete messages from %s failed."
(elmo-folder-name-internal src-folder))
+2003-09-19 Yuuichi Teranishi <teranisi@gohome.org>
+
+ * wl-summary.el (wl-summary-delete-all-msgs): Use
+ elmo-folder-move-messages instead of elmo-folder-delete-messages
+ and elmo-folder-detach-messages.
+
+ * wl-expire.el (wl-expire-delete): Ditto.
+ (wl-expire-refile-with-copy-reserve-msg): Ditto.
+
2003-09-18 Yuuichi Teranishi <teranisi@gohome.org>
* wl-vars.el (wl-message-use-header-narrowing): New user option.
(format "Expiring (delete) %s msgs..."
(length delete-list))))
(message "%s" mess)
- (if (elmo-folder-delete-messages folder delete-list)
+ (if (elmo-folder-move-messages folder delete-list 'null)
(progn
- (elmo-folder-detach-messages folder delete-list)
(wl-expire-append-log
(elmo-folder-name-internal folder)
delete-list nil 'delete)
(wl-expire-delete-reserved-messages refile-list folder))
(when refile-list
(if (setq ret-val
- (elmo-folder-delete-messages folder refile-list))
+ (elmo-folder-move-messages folder refile-list 'null))
(progn
- (elmo-folder-detach-messages folder refile-list)
(wl-expire-append-log
(elmo-folder-name-internal folder)
refile-list nil 'delete))))))
(length dels)))
(progn
(message "Deleting...")
- (elmo-folder-delete-messages wl-summary-buffer-elmo-folder dels)
- (elmo-folder-detach-messages wl-summary-buffer-elmo-folder dels)
+ (elmo-folder-move-messages wl-summary-buffer-elmo-folder dels
+ 'null)
(wl-summary-set-message-modified)
(wl-folder-set-folder-updated (wl-summary-buffer-folder-name)
(list 0 0 0))