From 839dae713ed842a6eac3bb7a16f8d48be16928c2 Mon Sep 17 00:00:00 2001 From: Jan Malakhovski Date: Sun, 27 Dec 2015 14:54:17 +0000 Subject: [PATCH] org-notmuch: Add date support to org-notmuch-store-link * contrib/lisp/org-notmuch.el (org-notmuch-store-link): Add date support. * doc/org.texi: Fix `org-capture-templates' documentation. --- contrib/lisp/org-notmuch.el | 7 ++++--- doc/org.texi | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/contrib/lisp/org-notmuch.el b/contrib/lisp/org-notmuch.el index 712ec5a9b..265742e1c 100644 --- a/contrib/lisp/org-notmuch.el +++ b/contrib/lisp/org-notmuch.el @@ -71,15 +71,16 @@ Should accept a notmuch search string as the sole argument." (defun org-notmuch-store-link () "Store a link to a notmuch search or message." (when (eq major-mode 'notmuch-show-mode) - (let* ((message-id (notmuch-show-get-prop :id)) + (let* ((message-id (notmuch-show-get-message-id t)) (subject (notmuch-show-get-subject)) (to (notmuch-show-get-to)) (from (notmuch-show-get-from)) + (date (org-trim (notmuch-show-get-date))) desc link) - (org-store-link-props :type "notmuch" :from from :to to + (org-store-link-props :type "notmuch" :from from :to to :date date :subject subject :message-id message-id) (setq desc (org-email-link-description)) - (setq link (concat "notmuch:" "id:" message-id)) + (setq link (concat "notmuch:id:" message-id)) (org-add-link-props :link link :description desc) link))) diff --git a/doc/org.texi b/doc/org.texi index c3c5b4d19..92ec29a5a 100644 --- a/doc/org.texi +++ b/doc/org.texi @@ -7304,7 +7304,7 @@ Link type | Available keywords bbdb | %:name %:company irc | %:server %:port %:nick vm, vm-imap, wl, mh, mew, rmail, | %:type %:subject %:message-id -gnus | %:from %:fromname %:fromaddress +gnus, notmuch | %:from %:fromname %:fromaddress | %:to %:toname %:toaddress | %:date @r{(message date header field)} | %:date-timestamp @r{(date as active timestamp)}