summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Malakhovski <oxij@oxij.org>2015-12-27 14:54:17 +0000
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2015-12-29 21:17:00 +0100
commit839dae713ed842a6eac3bb7a16f8d48be16928c2 (patch)
tree86a4231945e8d523c1ceb660d06c64adf06ac11b
parentd1f42e7f32833e6568a8bb54d91f1113f06a9685 (diff)
downloadorg-mode-839dae713ed842a6eac3bb7a16f8d48be16928c2.tar.gz
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.
-rw-r--r--contrib/lisp/org-notmuch.el7
-rw-r--r--doc/org.texi2
2 files changed, 5 insertions, 4 deletions
diff --git a/contrib/lisp/org-notmuch.el b/contrib/lisp/org-notmuch.el
index 712ec5a..265742e 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 c3c5b4d..92ec29a 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)}