From: teranisi Date: Thu, 14 Nov 2002 12:56:03 +0000 (+0000) Subject: * elmo-msgdb.el (elmo-msgdb-get-message-id-from-buffer): Added X-Git-Tag: elmo-mark-restart~86 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=64eb91d7fe775e78e0f1e6555b595e40f391260a;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 3724cab..9e2d267 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 bbe7d43..286741a 100644 --- a/elmo/elmo-msgdb.el +++ b/elmo/elmo-msgdb.el @@ -998,12 +998,16 @@ Return CONDITION itself if no entity exists in msgdb." 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.