+2011-05-29 David Maus <dmaus@ictsoc.de>
+
+ * elmo.el (elmo-folder-append-buffer): Add optional fourth
+ argument, return number of appended message if possible.
+ * elmo-pipe.el (elmo-folder-append-buffer): Dto.
+ * elmo-maildir.el (elmo-folder-append-buffer): Dto.
+ * elmo-flag.el (elmo-folder-append-buffer): Dto.
+ * elmo-localdir.el (elmo-folder-append-buffer): Dto.
+ * elmo-filter.el (elmo-folder-append-buffer): Dto.
+ * elmo-cache.el (elmo-folder-append-buffer): Dto.
+ * elmo-archive.el (elmo-folder-append-buffer)
+ (elmo-archive-folder-append-buffer): Dto.
+
2010-08-31 David Maus <dmaus@ictsoc.de>
* elmo-imap4.el (elmo-folder-delete-messages-plugged): Use smarter
(elmo-archive-message-fetch-internal folder number))
(luna-define-method elmo-folder-append-buffer ((folder elmo-archive-folder)
- &optional flags number)
- (elmo-archive-folder-append-buffer folder flags number))
+ &optional flags number
+ return-number)
+ (elmo-archive-folder-append-buffer folder flags number return-number))
;; verrrrrry slow!!
-(defun elmo-archive-folder-append-buffer (folder flags number)
+(defun elmo-archive-folder-append-buffer (folder flags number return-number)
(let* ((type (elmo-archive-folder-archive-type-internal folder))
(prefix (elmo-archive-folder-archive-prefix-internal folder))
(arc (elmo-archive-get-archive-name folder))
new-msgdb))
(luna-define-method elmo-folder-append-buffer ((folder elmo-cache-folder)
- &optional flags number)
+ &optional flags number
+ return-number)
;; dir-name is changed according to msgid.
(unless (elmo-cache-folder-dir-name-internal folder)
(let ((msgid (std11-field-body "message-id"))
type))
(luna-define-method elmo-folder-append-buffer ((folder elmo-filter-folder)
- &optional flag number)
+ &optional flag number
+ return-number)
(elmo-folder-append-buffer
(elmo-filter-folder-target-internal folder)
- flag number))
+ flag number return-number))
(defun elmo-folder-append-messages-filter-* (dst-folder
src-folder
numbers)
(luna-define-method elmo-folder-append-buffer ((folder elmo-flag-folder)
- &optional flag number)
+ &optional flag number
+ return-number)
(error "Cannot append to the flag folder"))
(luna-define-method elmo-folder-unset-flag :before ((folder elmo-flag-folder)
imap-flag))
(luna-define-method elmo-folder-append-buffer
- ((folder elmo-imap4-folder) &optional flags number)
+ ((folder elmo-imap4-folder) &optional flags number return-number)
(if (elmo-folder-plugged-p folder)
(let ((session (elmo-imap4-get-session folder))
send-buffer result)
(sort flist '<))))
(luna-define-method elmo-folder-append-buffer ((folder elmo-localdir-folder)
- &optional flags number)
+ &optional flags number
+ return-number)
(let ((filename (elmo-message-file-name
folder
(or number
(rename-file src dst)))
(luna-define-method elmo-folder-append-buffer ((folder elmo-maildir-folder)
- &optional flags number)
+ &optional flags number
+ return-number)
(let ((basedir (elmo-maildir-folder-directory-internal folder))
(src-buf (current-buffer))
dst-buf filename)
same-number))
(luna-define-method elmo-folder-append-buffer ((folder elmo-pipe-folder)
- &optional flag number)
+ &optional flag number
+ return-number)
(elmo-folder-append-buffer (elmo-pipe-folder-dst-internal folder)
- flag number))
+ flag number return-number))
(luna-define-method elmo-message-fetch ((folder elmo-pipe-folder)
number strategy
FOLDER is the ELMO folder structure.")
(luna-define-generic elmo-folder-append-buffer (folder &optional flags
- number)
+ number return-number)
"Append current buffer as a new message.
FOLDER is the destination folder (ELMO folder structure).
FLAGS is the flag list for the appended message (list of symbols).
If it is nil, the appended message will be treated as `new'.
If optional argument NUMBER is specified, the new message number is set
\(if possible\).
+If optional argument RETURN-NUMBER is non-nil, return the number
+of the appended message if possible. If the number could not be
+obtained return t.
Return nil on failure.")
(luna-define-generic elmo-folder-pack-numbers (folder)