Parcourir la source

Define properties %:date-timestamp and %:date-timestamp-inactive

* org-gnus.el (org-gnus-store-link): Define properties
%:date-timestamp and %:date-timestamp-inactive.
David Maus il y a 14 ans
Parent
commit
fa93aa78f8
1 fichiers modifiés avec 7 ajouts et 3 suppressions
  1. 7 3
      lisp/org-gnus.el

+ 7 - 3
lisp/org-gnus.el

@@ -152,8 +152,11 @@ 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 (mail-header-date header))
-	   (org-date (format-time-string 
-		      (cdr org-time-stamp-formats) (date-to-time date)))
+	   (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))))
 	   (subject (copy-sequence (mail-header-subject header)))
 	   (to (cdr (assq 'To (mail-header-extra header))))
 	   newsgroups x-no-archive desc link)
@@ -172,7 +175,8 @@ If `org-store-link' was called with a prefix arg the meaning of
       (org-store-link-props :type "gnus" :from from :subject subject 
 			    :message-id message-id :group group :to to)
       (when date
-	(org-add-link-props :date date :org-date org-date))
+	(org-add-link-props :date date :date-timestamp date-ts
+			    :date-timestamp-inactive date-ts-ia))
       (setq desc (org-email-link-description)
 	    link (org-gnus-article-link
 		  group	newsgroups message-id x-no-archive))