Re: [O] [PATCH 2/2] org-notmuch: add date support to org-notmuch-store-link

2015-12-29 Thread Nicolas Goaziou
Hello,

Jan Malakhovski  writes:

> * contrib/lisp/org-notmuch.el (org-notmuch-store-link): Add date support.
> * doc/org.texi: Fix `org-capture-templates' documentation.

Applied. Thank you.

Regards,

-- 
Nicolas Goaziou



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

2015-12-27 Thread Jan Malakhovski
* 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 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)}
-- 
2.6.4




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

2015-10-25 Thread Jan Malakhovski
---
 contrib/lisp/org-notmuch.el | 7 ---
 1 file changed, 4 insertions(+), 3 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)))
 
-- 
2.5.3