(wl-draft-reedit): Ditto.
(wl-draft-queue-flush): Ditto.
* wl-mime.el (wl-message-request-partial): Ditto.
(wl-message-delete-current-part): Use `elmo-message-fetch-string'
instead of `elmo-message-fetch'.
* wl-action.el (wl-summary-exec-action-resend-subr): Ditto.
* wl-summary.el (wl-summary-message-string): Ditto.
* elmo.el (elmo-message-fetch): Removed argument `outbuf' and
exchange order of arguments `section' and `unread'.
(elmo-message-encache): Follow the API change.
(elmo-message-match-condition): Ditto.
(elmo-generic-folder-append-messages): Ditto.
(elmo-message-fetch-string): New function.
* elmo-split.el (elmo-split-subr): Ditto.
* elmo-spam.el (elmo-spam-message-fetch): Ditto.
* elmo-pipe.el (elmo-message-fetch): Ditto.
* elmo-multi.el (elmo-message-fetch): Ditto.
* elmo-mime.el (elmo-message-mime-entity): Ditto.
* elmo-flag.el (elmo-global-flag-set-internal): Ditto.
* elmo-filter.el (elmo-message-fetch): Ditto.
* elmo-dop.el (elmo-folder-append-buffer-dop-delayed): Ditto.
* elmo-imap4.el (mime-imap-location-section-body): Use
`elmo-message-fetch-string' instead of `elmo-message-fetch' and
follow the API change.
+2005-01-11 Hiroya Murata <lapis-lazuli@pop06.odn.ne.jp>
+
+ * elmo.el (elmo-message-fetch): Removed argument `outbuf' and
+ exchange order of arguments `section' and `unread'.
+ (elmo-message-encache): Follow the API change.
+ (elmo-message-match-condition): Ditto.
+ (elmo-generic-folder-append-messages): Ditto.
+ (elmo-message-fetch-string): New function.
+
+ * elmo-split.el (elmo-split-subr): Ditto.
+
+ * elmo-spam.el (elmo-spam-message-fetch): Ditto.
+
+ * elmo-pipe.el (elmo-message-fetch): Ditto.
+
+ * elmo-multi.el (elmo-message-fetch): Ditto.
+
+ * elmo-mime.el (elmo-message-mime-entity): Ditto.
+
+ * elmo-flag.el (elmo-global-flag-set-internal): Ditto.
+
+ * elmo-filter.el (elmo-message-fetch): Ditto.
+
+ * elmo-dop.el (elmo-folder-append-buffer-dop-delayed): Ditto.
+
+ * elmo-imap4.el (mime-imap-location-section-body): Use
+ `elmo-message-fetch-string' instead of `elmo-message-fetch' and
+ follow the API change.
+
2005-01-10 Hiroya Murata <lapis-lazuli@pop06.odn.ne.jp>
* elmo-access.el: New file.
(with-temp-buffer
(when (elmo-message-fetch spool-folder number
(elmo-make-fetch-strategy 'entire)
- nil (current-buffer) 'unread)
+ 'unread)
(setq flags (or (elmo-message-flags-for-append folder (* -1 number))
(cond ((listp flag)
flag)
(luna-define-method elmo-message-fetch ((folder elmo-filter-folder)
number strategy
- &optional section outbuf unseen)
+ &optional unseen section)
(unless unseen
(elmo-filter-folder-countup-message-flags folder (list number) -1))
(when (elmo-message-fetch (elmo-filter-folder-target-internal folder)
- number strategy section outbuf unseen)
+ number strategy unseen section)
(unless unseen
(elmo-filter-folder-countup-message-flags folder (list number))
(elmo-folder-notify-event folder 'flag-changed (list number)))
(elmo-copy-file (elmo-file-cache-path cache)
new-file)
(when (and folder number)
- (elmo-message-fetch folder number (elmo-make-fetch-strategy
- 'entire)
- nil (current-buffer))
+ (elmo-message-fetch folder number
+ (elmo-make-fetch-strategy 'entire))
(write-region-as-binary (point-min) (point-max) new-file nil
'no-msg))))
(elmo-flag-folder-set-minfo-internal
(mime-elmo-imap-location-folder-internal location)
(mime-elmo-imap-location-number-internal location)
(mime-elmo-imap-location-strategy-internal location)
- section
- (current-buffer)
- 'unseen)
+ 'unseen
+ section)
(buffer-string))
- (elmo-message-fetch
+ (elmo-message-fetch-string
(mime-elmo-imap-location-folder-internal location)
(mime-elmo-imap-location-number-internal location)
(mime-elmo-imap-location-strategy-internal location)
- section
- nil 'unseen)))
+ 'unseen
+ section)))
(luna-define-method mime-imap-location-bodystructure
(with-current-buffer rawbuf
(let (buffer-read-only)
(erase-buffer)
- (elmo-message-fetch folder number strategy
- nil (current-buffer)
- unread)))
+ (elmo-message-fetch folder number strategy unread)))
(mime-open-entity 'elmo-buffer rawbuf)))))
;; Replacement of mime-display-message.
(luna-define-method elmo-message-fetch ((folder elmo-multi-folder)
number strategy
- &optional section outbuf unseen)
+ &optional unseen section)
(let ((pair (elmo-multi-real-folder-number folder number)))
(when (elmo-message-fetch (car pair) (cdr pair)
- strategy section outbuf unseen)
+ strategy unseen section)
(unless unseen
(elmo-folder-notify-event folder 'flag-changed (list number)))
t)))
(luna-define-method elmo-message-fetch ((folder elmo-pipe-folder)
number strategy
- &optional section outbuf unseen)
+ &optional unseen section)
(when (elmo-message-fetch (elmo-pipe-folder-dst-internal folder)
- number strategy section outbuf unseen)
+ number strategy unseen section)
(unless unseen
(elmo-folder-notify-event folder 'flag-changed (list number)))
t))
(elmo-message-fetch
folder number
(elmo-find-fetch-strategy folder number nil 'entire)
- nil (current-buffer) 'unread)))
+ 'unread)))
;; generic implement
(luna-define-method elmo-spam-message-spam-p ((processor elsp-generic)
(when (ignore-errors
(elmo-message-fetch folder msg
(elmo-make-fetch-strategy 'entire)
- nil (current-buffer) 'unread))
+ 'unread))
(run-hooks 'elmo-split-fetch-hook)
(setq elmo-split-message-entity (mime-parse-buffer))
(setq flags (elmo-message-flags-for-append folder msg))
(luna-define-method elmo-message-encache ((folder elmo-folder) number
&optional read)
(let (path)
- (elmo-message-fetch
- folder number
- (elmo-make-fetch-strategy 'entire
- nil ;use-cache
- t ;save-cache
- (setq path (elmo-file-cache-get-path
- (elmo-message-field
- folder number 'message-id))))
- nil nil (not read))
+ (with-temp-buffer
+ (elmo-message-fetch
+ folder number
+ (elmo-make-fetch-strategy 'entire
+ nil ;use-cache
+ t ;save-cache
+ (setq path (elmo-file-cache-get-path
+ (elmo-message-field
+ folder number 'message-id))))
+ (not read)))
path))
(luna-define-generic elmo-message-fetch-bodystructure (folder number strategy)
(luna-define-generic elmo-message-fetch (folder number strategy
&optional
- section
- outbuf
- unread)
- "Fetch a message and return as a string.
+ unread
+ section)
+ "Fetch a message into current buffer.
FOLDER is the ELMO folder structure.
NUMBER is the number of the message in the FOLDER.
STRATEGY is the message fetching strategy.
-If optional argument SECTION is specified, only the SECTION of the message
-is fetched (if possible).
-If second optional argument OUTBUF is specified, fetched message is
-inserted to the buffer and returns t if fetch was ended successfully.
-If third optional argument UNREAD is non-nil, message is not flaged as read.
+If optional argument UNREAD is non-nil, message is not flaged as read.
+If second optional argument SECTION is specified, only the
+SECTION of the message is fetched (if possible).
Returns non-nil if fetching was succeed.")
(luna-define-generic elmo-message-fetch-with-cache-process (folder
(and cache t)
nil
cache-path)
- nil (current-buffer) t)
+ 'unread)
(set-buffer-multibyte default-enable-multibyte-characters)
(decode-coding-region (point-min) (point-max)
elmo-mime-display-as-is-coding-system)
'entire t nil
(elmo-file-cache-path cache)))
(error "Unplugged")))
- nil (current-buffer)
'unread)
(> (buffer-size) 0)
(elmo-folder-append-buffer
number strategy)
nil)
+(defun elmo-message-fetch-string (folder number strategy
+ &optional
+ unread
+ section)
+ (with-temp-buffer
+ (when (elmo-message-fetch folder number strategy section unread)
+ (buffer-string))))
+
(luna-define-method elmo-message-fetch ((folder elmo-folder)
number strategy
&optional
- section
- outbuf
- unread)
- (let (result)
- (prog1
- (if outbuf
- (with-current-buffer outbuf
- (erase-buffer)
- (setq result (elmo-message-fetch-with-cache-process
- folder number strategy section unread)))
- (with-temp-buffer
- (setq result (elmo-message-fetch-with-cache-process
- folder number strategy section unread))
- (buffer-string)))
- (when (and result
- (not unread)
- (elmo-message-flagged-p folder number 'unread))
- (elmo-message-unset-flag folder number 'unread 'local)))))
+ unread
+ section)
+ (erase-buffer)
+ (when (elmo-message-fetch-with-cache-process folder number
+ strategy section unread)
+ (when (and (not unread)
+ (elmo-message-flagged-p folder number 'unread))
+ (elmo-message-unset-flag folder number 'unread 'local))
+ t))
(luna-define-method elmo-message-fetch-with-cache-process ((folder elmo-folder)
number strategy
+2005-01-11 Hiroya Murata <lapis-lazuli@pop06.odn.ne.jp>
+
+ * wl-draft.el (wl-draft-insert-get-message): Follow the API change.
+ (wl-draft-reedit): Ditto.
+ (wl-draft-queue-flush): Ditto.
+
+ * wl-mime.el (wl-message-request-partial): Ditto.
+ (wl-message-delete-current-part): Use `elmo-message-fetch-string'
+ instead of `elmo-message-fetch'.
+
+ * wl-action.el (wl-summary-exec-action-resend-subr): Ditto.
+
+ * wl-summary.el (wl-summary-message-string): Ditto.
+
2005-01-07 Hiroya Murata <lapis-lazuli@pop06.odn.ne.jp>
* wl-util.el (wl-current-message-buffer): Follow the API change.
(let ((beg (point)))
;; Insert the message to be resent.
(insert
- (with-temp-buffer
- (elmo-message-fetch folder number
- (if wl-summary-resend-use-cache
- (elmo-make-fetch-strategy
- 'entire 'maybe nil
- (elmo-file-cache-get-path
- (elmo-message-field
- folder number 'message-id)))
- (elmo-make-fetch-strategy 'entire))
- nil (current-buffer) 'unread)
- (buffer-string)))
+ ;; elmo-message-fetch is erace current buffer before fetch message
+ (elmo-message-fetch-string folder number
+ (if wl-summary-resend-use-cache
+ (elmo-make-fetch-strategy
+ 'entire 'maybe nil
+ (elmo-file-cache-get-path
+ (elmo-message-field
+ folder number 'message-id)))
+ (elmo-make-fetch-strategy 'entire))
+ 'unread))
(goto-char (point-min))
(search-forward "\n\n")
(forward-char -1)
wl-draft-cite-function)
(unwind-protect
(progn
- (elmo-message-fetch (wl-folder-get-elmo-folder fld)
- number
- ;; No cache.
- (elmo-make-fetch-strategy 'entire)
- nil mail-reply-buffer)
+ (with-current-buffer mail-reply-buffer
+ (erase-buffer)
+ (elmo-message-fetch (wl-folder-get-elmo-folder fld)
+ number
+ ;; No cache.
+ (elmo-make-fetch-strategy 'entire)))
(wl-draft-yank-from-mail-reply-buffer nil))
(kill-buffer mail-reply-buffer))))
(switch-to-buffer-other-frame buffer)
(switch-to-buffer buffer))
(set-buffer buffer)
- (elmo-message-fetch draft-folder number (elmo-make-fetch-strategy 'entire)
- nil (current-buffer))
+ (elmo-message-fetch draft-folder number (elmo-make-fetch-strategy 'entire))
(elmo-delete-cr-buffer)
(let ((mime-edit-again-ignored-field-regexp
"^\\(Content-.*\\|Mime-Version\\):"))
(wl-draft-queue-info-operation (car msgs) 'load)
(elmo-message-fetch queue-folder
(car msgs)
- (elmo-make-fetch-strategy 'entire)
- nil (current-buffer))
+ (elmo-make-fetch-strategy 'entire))
(condition-case err
(setq failure (funcall
wl-draft-queue-flush-send-function
(elmo-message-fetch (wl-folder-get-elmo-folder folder)
number
(elmo-make-fetch-strategy 'entire)
- nil
- (current-buffer)
'unread)
(mime-parse-buffer nil)))
(with-current-buffer orig-buf
(unless (string-equal
(buffer-string)
- (elmo-message-fetch folder number
- (elmo-make-fetch-strategy 'entire)))
+ (elmo-message-fetch-string
+ folder number
+ (elmo-make-fetch-strategy 'entire)))
(error "Buffer content differs from actual message")))
(when (and (elmo-folder-writable-p folder)
(buffer-live-p orig-buf)
(folder wl-summary-buffer-elmo-folder))
(if (null number)
(message "No message.")
- (elmo-set-work-buf
- (elmo-message-fetch folder
- number
- (elmo-make-fetch-strategy
- 'entire
- use-cache ; use cache
- nil ; save cache (should `t'?)
- (and
- use-cache
- (elmo-file-cache-get-path
- (elmo-message-field folder number 'message-id))))
- nil
- (current-buffer)
- 'unread)
- (buffer-string)))))
+ (elmo-message-fetch-string folder
+ number
+ (elmo-make-fetch-strategy
+ 'entire
+ use-cache ; use cache
+ nil ; save cache (should `t'?)
+ (and
+ use-cache
+ (elmo-file-cache-get-path
+ (elmo-message-field folder number
+ 'message-id))))
+ 'unread))))
(defun wl-summary-reedit (&optional arg)
"Re-edit current message.