Allow %:org-date for Gnus links.

* org-capture.el (org-capture-templates): update docstring
to advertize %:org-date.

* org-remember.el (org-remember-templates): update docstring
to advertize %:org-date.

* org-gnus.el (org-gnus-store-link): define %:org-date.

This was suggested by Sébastien Vauban.
This commit is contained in:
Bastien Guerry 2010-09-22 11:35:32 +02:00
parent 90cc0c36c7
commit d821c54aab
3 changed files with 8 additions and 3 deletions

View File

@ -231,7 +231,8 @@ vm, wl, mh, rmail | %:type %:subject %:message-id
| %:from %:fromname %:fromaddress
| %:to %:toname %:toaddress
| %:fromto (either \"to NAME\" or \"from NAME\")
gnus | %:group, for messages also all email fields
gnus | %:group, for messages also all email fields and
| %:org-date (the Date: header in Org format)
w3, w3m | %:type %:url
info | %:type %:file %:node
calendar | %:type %:date"

View File

@ -152,6 +152,8 @@ 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)))
(subject (copy-sequence (mail-header-subject header)))
(to (cdr (assq 'To (mail-header-extra header))))
newsgroups x-no-archive desc link)
@ -167,7 +169,8 @@ If `org-store-link' was called with a prefix arg the meaning of
(setq to (or to (gnus-fetch-original-field "To"))
newsgroups (gnus-fetch-original-field "Newsgroups")
x-no-archive (gnus-fetch-original-field "x-no-archive")))
(org-store-link-props :type "gnus" :from from :subject subject :date date
(org-store-link-props :type "gnus" :from from :subject subject
:date date :org-date org-date
:message-id message-id :group group :to to)
(setq desc (org-email-link-description)
link (org-gnus-article-link

View File

@ -167,7 +167,8 @@ vm, wl, mh, rmail | %:type %:subject %:message-id
| %:from %:fromname %:fromaddress
| %:to %:toname %:toaddress
| %:fromto (either \"to NAME\" or \"from NAME\")
gnus | %:group, for messages also all email fields
gnus | %:group, for messages also all email fields and
| %:org-date (the Date: header in Org format)
w3, w3m | %:type %:url
info | %:type %:file %:node
calendar | %:type %:date"