summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTassilo Horn <tassilo@member.fsf.org>2011-01-12 21:45:17 +0000
committerCarsten Dominik <carsten.dominik@gmail.com>2011-01-13 12:52:42 +0100
commite599234d5c0245dfc53037a6dc0128349b197627 (patch)
tree9b669a8d0d71cea2fad29bb0dc86c7534725f88f
parent378beac76220e8b55e4c0d24b4f02ddba5142bbe (diff)
downloadorg-mode-e599234d5c0245dfc53037a6dc0128349b197627.tar.gz
Fix org-store-link in GNUS messages with date
* lisp/org-gnus.el (org-gnus-store-link): org-store-link on gnus message fails
-rw-r--r--lisp/org-gnus.el15
1 files changed, 10 insertions, 5 deletions
diff --git a/lisp/org-gnus.el b/lisp/org-gnus.el
index 32641bf..ae5dc52 100644
--- a/lisp/org-gnus.el
+++ b/lisp/org-gnus.el
@@ -152,11 +152,16 @@ If `org-store-link' was called with a prefix arg the meaning of
(from (mail-header-from header))
(message-id (org-remove-angle-brackets (mail-header-id header)))
(date (org-trim (mail-header-date header)))
- (date-ts (and date (format-time-string
- (org-time-stamp-format t) (date-to-time date))))
- (date-ts-ia (and date (format-time-string
- (org-time-stamp-format t t)
- (date-to-time date))))
+ (date-ts (and date
+ (condition-case nil
+ (format-time-string
+ (org-time-stamp-format t)
+ (date-to-time date)))))
+ (date-ts-ia (and date
+ (condition-case nil
+ (format-time-string
+ (org-time-stamp-format t t)
+ (date-to-time date)))))
(subject (copy-sequence (mail-header-subject header)))
(to (cdr (assq 'To (mail-header-extra header))))
newsgroups x-no-archive desc link)