emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] [PATCH 7/9] org-notmuch: add date support to org-notmuch-store-link


From: Jan Malakhovski
Subject: [O] [PATCH 7/9] org-notmuch: add date support to org-notmuch-store-link
Date: Tue, 3 Nov 2015 20:15:45 +0000

* 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 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 2bf2b24..106bdac 100644
--- a/doc/org.texi
+++ b/doc/org.texi
@@ -7315,7 +7315,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)}
-- 
2.6.2




reply via email to

[Prev in Thread] Current Thread [Next in Thread]