1 Return-Path: <amdragon@mit.edu>
\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 A1254431FBF
\r
6 for <notmuch@notmuchmail.org>; Sat, 24 Nov 2012 20:57:30 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5
\r
12 tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled
\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 C7J32gvhB2VQ for <notmuch@notmuchmail.org>;
\r
16 Sat, 24 Nov 2012 20:57:29 -0800 (PST)
\r
17 Received: from dmz-mailsec-scanner-5.mit.edu (DMZ-MAILSEC-SCANNER-5.MIT.EDU
\r
19 by olra.theworths.org (Postfix) with ESMTP id 186CA431FAF
\r
20 for <notmuch@notmuchmail.org>; Sat, 24 Nov 2012 20:57:28 -0800 (PST)
\r
21 X-AuditID: 12074422-b7f746d0000008cc-d2-50b1a5374951
\r
22 Received: from mailhub-auth-3.mit.edu ( [18.9.21.43])
\r
23 by dmz-mailsec-scanner-5.mit.edu (Symantec Messaging Gateway) with SMTP
\r
24 id DA.9A.02252.735A1B05; Sat, 24 Nov 2012 23:57:27 -0500 (EST)
\r
25 Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103])
\r
26 by mailhub-auth-3.mit.edu (8.13.8/8.9.2) with ESMTP id qAP4vGOc018856;
\r
27 Sat, 24 Nov 2012 23:57:16 -0500
\r
28 Received: from drake.dyndns.org
\r
29 (209-6-116-242.c3-0.arl-ubr1.sbo-arl.ma.cable.rcn.com
\r
30 [209.6.116.242]) (authenticated bits=0)
\r
31 (User authenticated as amdragon@ATHENA.MIT.EDU)
\r
32 by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id qAP4vEUg000086
\r
33 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);
\r
34 Sat, 24 Nov 2012 23:57:16 -0500 (EST)
\r
35 Received: from amthrax by drake.dyndns.org with local (Exim 4.77)
\r
36 (envelope-from <amdragon@mit.edu>)
\r
37 id 1TcUHK-0003Zv-04; Sat, 24 Nov 2012 23:57:13 -0500
\r
38 From: Austin Clements <amdragon@MIT.EDU>
\r
39 To: notmuch@notmuchmail.org
\r
40 Subject: [PATCH 5/6] python: Add bindings for notmuch_thread_get_messages
\r
41 Date: Sat, 24 Nov 2012 23:57:06 -0500
\r
42 Message-Id: <1353819427-13182-6-git-send-email-amdragon@mit.edu>
\r
43 X-Mailer: git-send-email 1.7.10.4
\r
44 In-Reply-To: <1353819427-13182-1-git-send-email-amdragon@mit.edu>
\r
45 References: <1353819427-13182-1-git-send-email-amdragon@mit.edu>
\r
46 X-Brightmail-Tracker:
\r
47 H4sIAAAAAAAAA+NgFtrFIsWRmVeSWpSXmKPExsUixCmqrWu+dGOAwbeNOhar5/JYXL85k9mB
\r
48 yWPnrLvsHs9W3WIOYIrisklJzcksSy3St0vgyjg7cSljwRH+isXrn7I3MD7n7mLk5JAQMJH4
\r
49 cnY2M4QtJnHh3nq2LkYuDiGBfYwSna+3skI4Gxgldn75xwpSJSTwiEli3oZYiMRcRomXf2eB
\r
50 tbMJaEhs27+cEcQWEZCW2Hl3NlgDs4CjxOf9i9hAbGEBT4nd/dtYuhg5OFgEVCWWdeeBhHkF
\r
51 HCTuv77CBnGFokT3swlsICWcQK2Ne+Ug1jpI3Po3iXkCI/8CRoZVjLIpuVW6uYmZOcWpybrF
\r
52 yYl5ealFuqZ6uZkleqkppZsYQUHE7qK0g/HnQaVDjAIcjEo8vDcSNwYIsSaWFVfmHmKU5GBS
\r
53 EuXNXAQU4kvKT6nMSCzOiC8qzUktPsQowcGsJMJrrQqU401JrKxKLcqHSUlzsCiJ815Luekv
\r
54 JJCeWJKanZpakFoEk5Xh4FCS4J28BKhRsCg1PbUiLTOnBCHNxMEJMpwHaLgoSA1vcUFibnFm
\r
55 OkT+FKOilDhvA0hCACSRUZoH1wuL8leM4kCvCPPWgVTxABMEXPcroMFMQIOfzl4HMrgkESEl
\r
56 1cA4xTc58+LuuiP7by0N+8QQuiTuu80nM8+3/3g3Bk6uLrnjpmLwIGfLzem531c0OMoeOGK9
\r
57 QyY7vffB0U/8S3Z0/en5Xd0gwP40S8d7ueiba1Es9X/L/n5La1kmvjRNP1DqxtwTngXPeaX/
\r
58 3r695cq383E/1zD5KTttDvLVfxp87vKrZSUy60oeKbEUZyQaajEXFScCAOJnGhPNAgAA
\r
59 X-BeenThere: notmuch@notmuchmail.org
\r
60 X-Mailman-Version: 2.1.13
\r
62 List-Id: "Use and development of the notmuch mail system."
\r
63 <notmuch.notmuchmail.org>
\r
64 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
65 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
66 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
67 List-Post: <mailto:notmuch@notmuchmail.org>
\r
68 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
69 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
70 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
71 X-List-Received-Date: Sun, 25 Nov 2012 04:57:31 -0000
\r
74 bindings/python/notmuch/thread.py | 27 ++++++++++++++++++++++-----
\r
75 1 file changed, 22 insertions(+), 5 deletions(-)
\r
77 diff --git a/bindings/python/notmuch/thread.py b/bindings/python/notmuch/thread.py
\r
78 index 009cb2b..0454dbd 100644
\r
79 --- a/bindings/python/notmuch/thread.py
\r
80 +++ b/bindings/python/notmuch/thread.py
\r
81 @@ -128,11 +128,6 @@ class Thread(object):
\r
82 in the thread. It will only iterate over the messages in the thread
\r
83 which are not replies to other messages in the thread.
\r
85 - To iterate over all messages in the thread, the caller will need to
\r
86 - iterate over the result of :meth:`Message.get_replies` for each
\r
87 - top-level message (and do that recursively for the resulting
\r
90 :returns: :class:`Messages`
\r
91 :raises: :exc:`NotInitializedError` if query is not initialized
\r
92 :raises: :exc:`NullPointerError` if search_messages failed
\r
93 @@ -147,6 +142,28 @@ class Thread(object):
\r
95 return Messages(msgs_p, self)
\r
97 + """notmuch_thread_get_messages"""
\r
98 + _get_messages = nmlib.notmuch_thread_get_messages
\r
99 + _get_messages.argtypes = [NotmuchThreadP]
\r
100 + _get_messages.restype = NotmuchMessagesP
\r
102 + def get_messages(self):
\r
103 + """Returns a :class:`Messages` iterator for all messages in 'thread'
\r
105 + :returns: :class:`Messages`
\r
106 + :raises: :exc:`NotInitializedError` if query is not initialized
\r
107 + :raises: :exc:`NullPointerError` if get_messages failed
\r
109 + if not self._thread:
\r
110 + raise NotInitializedError()
\r
112 + msgs_p = Thread._get_messages(self._thread)
\r
115 + raise NullPointerError()
\r
117 + return Messages(msgs_p, self)
\r
119 _get_matched_messages = nmlib.notmuch_thread_get_matched_messages
\r
120 _get_matched_messages.argtypes = [NotmuchThreadP]
\r
121 _get_matched_messages.restype = c_int
\r