From: teranisi Date: Thu, 14 Nov 2002 12:55:04 +0000 (+0000) Subject: * elmo-msgdb.el (elmo-msgdb-get-message-id-from-buffer): Added X-Git-Tag: wl-2_10_0pre2~1 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=40f5de1a09510d7a28ecc0bef4fea09b5845511f;p=elisp%2Fwanderlust.git * elmo-msgdb.el (elmo-msgdb-get-message-id-from-buffer): Added workaround for invalid message-id. --- diff --git a/elmo/ChangeLog b/elmo/ChangeLog index 61927b7..7166c01 100644 --- a/elmo/ChangeLog +++ b/elmo/ChangeLog @@ -1,3 +1,8 @@ +2002-11-14 Yuuichi Teranishi + + * elmo-msgdb.el (elmo-msgdb-get-message-id-from-buffer): Added + workaround for invalid message-id. + 2002-11-13 Yuuichi Teranishi * elmo-pop3.el (elmo-pop3-get-session): If if-exists is 'any-exists, diff --git a/elmo/elmo-msgdb.el b/elmo/elmo-msgdb.el index 6eda5f8..7364c5c 100644 --- a/elmo/elmo-msgdb.el +++ b/elmo/elmo-msgdb.el @@ -768,12 +768,16 @@ header separator." seen-list)) (defun elmo-msgdb-get-message-id-from-buffer () - (or (elmo-field-body "message-id") + (let ((msgid (elmo-field-body "message-id"))) + (if msgid + (if (string-match "<\\(.+\\)>$" msgid) + msgid + (concat "<" msgid ">")) ; Invaild message-id. ;; no message-id, so put dummy msgid. (concat "<" (timezone-make-date-sortable (elmo-field-body "date")) (nth 1 (eword-extract-address-components - (or (elmo-field-body "from") "nobody"))) ">"))) + (or (elmo-field-body "from") "nobody"))) ">")))) (defsubst elmo-msgdb-create-overview-from-buffer (number &optional size time) "Create overview entity from current buffer.