From: dmaus Date: Sun, 5 Jun 2011 09:06:10 +0000 (+0000) Subject: Obtain number of appended draft message by `elmo-folder-append-buffer' X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bf2b256dc7f2cccbb68b1f091ca787a2196354ae;p=elisp%2Fwanderlust.git Obtain number of appended draft message by `elmo-folder-append-buffer' * wl-draft.el (wl-draft-save): Obtain number of appended draft message by `elmo-folder-append-buffer', handle case UID of appended message could not be found. --- diff --git a/wl/ChangeLog b/wl/ChangeLog index d9703a4..531fa16 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,3 +1,9 @@ +2011-06-05 David Maus + + * wl-draft.el (wl-draft-save): Obtain number of appended draft + message by `elmo-folder-append-buffer', handle case UID of + appended message could not be found. + 2010-08-31 TAKAHASHI Kaoru * wl-summary.el: Delete trailing whitespace. diff --git a/wl/wl-draft.el b/wl/wl-draft.el index 28b73b2..08995f7 100644 --- a/wl/wl-draft.el +++ b/wl/wl-draft.el @@ -1439,15 +1439,16 @@ If KILL-WHEN-DONE is non-nil, current draft buffer is killed" (mime-edit-translate-buffer)) (wl-draft-get-header-delimiter t) (setq next-number - (elmo-folder-next-message-number (wl-draft-get-folder))) - (elmo-folder-append-buffer (wl-draft-get-folder))) + (elmo-folder-append-buffer (wl-draft-get-folder) nil nil t))) (elmo-folder-check (wl-draft-get-folder)) (elmo-folder-commit (wl-draft-get-folder)) - (setq wl-draft-buffer-message-number next-number) - (rename-buffer (format "%s/%d" wl-draft-folder next-number) t) + (if (not (numberp next-number)) + (setq wl-draft-buffer-message-number nil) + (setq wl-draft-buffer-message-number next-number) + (rename-buffer (format "%s/%d" wl-draft-folder next-number) t) + (wl-draft-config-info-operation wl-draft-buffer-message-number 'save)) (setq buffer-file-name (buffer-name)) (set-buffer-modified-p nil) - (wl-draft-config-info-operation wl-draft-buffer-message-number 'save) (message "Saving...done"))) (message "(No changes need to be saved)")))