From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Malakhovski Subject: [PATCH 2/2] org-notmuch: add date support to org-notmuch-store-link Date: Sun, 27 Dec 2015 14:54:17 +0000 Message-ID: <1451228057-12960-3-git-send-email-oxij@oxij.org> References: <1451228057-12960-1-git-send-email-oxij@oxij.org> Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:58516) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aDCiS-0008Hb-4C for emacs-orgmode@gnu.org; Sun, 27 Dec 2015 09:54:36 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aDCiR-0000mO-8j for emacs-orgmode@gnu.org; Sun, 27 Dec 2015 09:54:36 -0500 Received: from tricoro.koumakan.jp ([195.154.188.176]:35085) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aDCiR-0000mK-35 for emacs-orgmode@gnu.org; Sun, 27 Dec 2015 09:54:35 -0500 In-Reply-To: <1451228057-12960-1-git-send-email-oxij@oxij.org> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Cc: 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