1 Return-Path: <bremner@pivot.cs.unb.ca>
\r
2 X-Original-To: notmuch@notmuchmail.org
\r
3 Delivered-To: notmuch@notmuchmail.org
\r
4 Received: from localhost (localhost [127.0.0.1])
\r
5 by olra.theworths.org (Postfix) with ESMTP id 44EF3431FC2
\r
6 for <notmuch@notmuchmail.org>; Thu, 11 Feb 2010 18:37:59 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-1.964 tagged_above=-999 required=5 tests=[AWL=0.635,
\r
12 BAYES_00=-2.599] autolearn=ham
\r
13 Received: from olra.theworths.org ([127.0.0.1])
\r
14 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
15 with ESMTP id IwTOfaEmtlPa for <notmuch@notmuchmail.org>;
\r
16 Thu, 11 Feb 2010 18:37:58 -0800 (PST)
\r
17 Received: from pivot.cs.unb.ca (pivot.cs.unb.ca [131.202.240.57])
\r
18 by olra.theworths.org (Postfix) with ESMTP id 59BC9431FBC
\r
19 for <notmuch@notmuchmail.org>; Thu, 11 Feb 2010 18:37:58 -0800 (PST)
\r
21 fctnnbsc30w-142167166109.pppoe-dynamic.high-speed.nb.bellaliant.net
\r
22 ([142.167.166.109] helo=rocinante.cs.unb.ca)
\r
23 by pivot.cs.unb.ca with esmtpsa (TLS1.0:RSA_AES_256_CBC_SHA1:32)
\r
24 (Exim 4.69) (envelope-from <bremner@pivot.cs.unb.ca>)
\r
25 id 1NflPq-0002Kh-0H; Thu, 11 Feb 2010 22:37:58 -0400
\r
26 Received: from bremner by rocinante.cs.unb.ca with local (Exim 4.71)
\r
27 (envelope-from <bremner@rocinante.cs.unb.ca>)
\r
28 id 1NflN8-0007uW-UW; Thu, 11 Feb 2010 22:35:10 -0400
\r
29 From: david@tethera.net
\r
30 To: notmuch@notmuchmail.org
\r
31 Date: Thu, 11 Feb 2010 22:34:32 -0400
\r
32 Message-Id: <1265942072-30247-3-git-send-email-david@tethera.net>
\r
33 X-Mailer: git-send-email 1.6.5
\r
34 In-Reply-To: <1265942072-30247-2-git-send-email-david@tethera.net>
\r
35 References: <id:1260021951-3022-1-git-send-email-david@tethera.net>
\r
36 <1265942072-30247-1-git-send-email-david@tethera.net>
\r
37 <1265942072-30247-2-git-send-email-david@tethera.net>
\r
38 X-Sender-Verified: bremner@pivot.cs.unb.ca
\r
39 Cc: David Bremner <bremner@unb.ca>
\r
40 Subject: [notmuch] [PATCH 2/2] Add functions notmuch-show-get-(bcc, cc, date,
\r
42 to) to return the corresponding header field for the current message
\r
43 as a string. These are thin wrappers around notmuch-show-get-header,
\r
44 which means they each cause a full parse of the RFC822 header. The
\r
45 main idea is to fix an api.
\r
46 X-BeenThere: notmuch@notmuchmail.org
\r
47 X-Mailman-Version: 2.1.13
\r
49 List-Id: "Use and development of the notmuch mail system."
\r
50 <notmuch.notmuchmail.org>
\r
51 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
52 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
53 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
54 List-Post: <mailto:notmuch@notmuchmail.org>
\r
55 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
56 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
57 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
58 X-List-Received-Date: Fri, 12 Feb 2010 02:37:59 -0000
\r
60 From: David Bremner <bremner@unb.ca>
\r
63 notmuch.el | 32 ++++++++++++++++++++++++++++++++
\r
64 1 files changed, 32 insertions(+), 0 deletions(-)
\r
66 diff --git a/notmuch.el b/notmuch.el
\r
67 index c96fd94..d2a3b1b 100644
\r
70 @@ -225,6 +225,38 @@ Unlike builtin `previous-line' this version accepts no arguments."
\r
71 (re-search-forward notmuch-show-tags-regexp)
\r
72 (split-string (buffer-substring (match-beginning 1) (match-end 1)))))
\r
74 +(defun notmuch-show-get-bcc ()
\r
75 + "Return To address of current message"
\r
76 + (notmuch-show-get-header-field 'bcc))
\r
78 +(defun notmuch-show-get-cc ()
\r
79 + "Return To address of current message"
\r
80 + (notmuch-show-get-header-field 'cc))
\r
82 +(defun notmuch-show-get-date ()
\r
83 + "Return To address of current message"
\r
84 + (notmuch-show-get-header-field 'date))
\r
86 +(defun notmuch-show-get-from ()
\r
87 + "Return From address of current message"
\r
88 + (notmuch-show-get-header-field 'from))
\r
90 +(defun notmuch-show-get-subject ()
\r
91 + "Return subject of current message"
\r
92 + (notmuch-show-get-header-field 'subject))
\r
94 +(defun notmuch-show-get-to ()
\r
95 + "Return To address of current message"
\r
96 + (notmuch-show-get-header-field 'to))
\r
98 +(defun notmuch-show-get-header-field (name)
\r
99 + "Retrieve the header field NAME from the current message.
\r
100 +NAME should be a symbol, in lower case, as returned by
\r
101 +mail-header-extract-no-properties"
\r
102 + (let* ((result (assoc name (notmuch-show-get-header)))
\r
103 + (val (and result (cdr result))))
\r
106 (defun notmuch-show-get-header ()
\r
107 "Retrieve and parse the header from the current message. Returns an alist with of (header . value)
\r
108 where header is a symbol and value is a string. The summary from notmuch-show is returned as the
\r