emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Jan Malakhovski <oxij@oxij.org>
To: emacs-orgmode@gnu.org
Cc: Jan Malakhovski <oxij@oxij.org>
Subject: [PATCH 2/2] org-notmuch: add date support to org-notmuch-store-link
Date: Sun, 25 Oct 2015 13:36:33 +0000	[thread overview]
Message-ID: <1445780193-25001-3-git-send-email-oxij@oxij.org> (raw)
In-Reply-To: <1445780193-25001-1-git-send-email-oxij@oxij.org>

---
 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

  parent reply	other threads:[~2015-10-25 13:36 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-25 13:36 [PATCH] remove some copy-paste and add date support to org-notmuch-store-link Jan Malakhovski
2015-10-25 13:36 ` [PATCH 1/2] factor out date-timestamp* calculations to org-store-link-props Jan Malakhovski
2015-10-25 13:36 ` Jan Malakhovski [this message]
  -- strict thread matches above, loose matches on Subject: below --
2015-12-27 14:54 [PATCH v3 part2 0/2] date-timestamp* calculations Jan Malakhovski
2015-12-27 14:54 ` [PATCH 2/2] org-notmuch: add date support to org-notmuch-store-link Jan Malakhovski
2015-12-29 20:24   ` Nicolas Goaziou

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1445780193-25001-3-git-send-email-oxij@oxij.org \
    --to=oxij@oxij.org \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).