notmuch.el: controlling what does and doesn't get expanded in searches
[notmuch-archives.git] / 1e / 2234949b129831318c3f4aeefe6915bf6b40e1
1 Return-Path: <polatel@gmail.com>\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 46D98431FAF\r
6         for <notmuch@notmuchmail.org>; Mon, 26 Nov 2012 08:23:05 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -0.799\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5\r
12         tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
13         FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
14 Received: from olra.theworths.org ([127.0.0.1])\r
15         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
16         with ESMTP id JCBtJORwRxJV for <notmuch@notmuchmail.org>;\r
17         Mon, 26 Nov 2012 08:23:04 -0800 (PST)\r
18 Received: from mail-ea0-f181.google.com (mail-ea0-f181.google.com\r
19         [209.85.215.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
20         (No client certificate requested)\r
21         by olra.theworths.org (Postfix) with ESMTPS id 8ED41431FAE\r
22         for <notmuch@notmuchmail.org>; Mon, 26 Nov 2012 08:23:04 -0800 (PST)\r
23 Received: by mail-ea0-f181.google.com with SMTP id k14so3538249eaa.26\r
24         for <notmuch@notmuchmail.org>; Mon, 26 Nov 2012 08:23:03 -0800 (PST)\r
25 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;\r
26         h=date:from:to:cc:subject:message-id:mail-followup-to:references\r
27         :mime-version:content-type:content-disposition:in-reply-to\r
28         :organization:user-agent;\r
29         bh=WRDaEOn0RbNdxEl9RvnCxl+1ggQSwz5b1SR5HTTJ7Hw=;\r
30         b=rmb2rjgk6gDoWAW1KMNxZpd2ewyJgQzz2LTSoj2H/ZXrrj49UdS9bDVD+kMlFrnSv3\r
31         WcvsG4atv68Ber/1TT3wWHX15O+nV48/18msiddsks05yxy6aROf9j7V+y8MsuQ5P7XO\r
32         LM9kgchHg+Zgt3kDxBwDsG8bKNK6yKZ3n8H2SWapfuDIJZ8r6LbmhrUFR072hDyCuFu/\r
33         SbP3h+cAv4Ataddl1AdtnRdVN4i7bdY7AqXzNOId3NbokZ8eJ4DbIrq64aA2BS5m/ov9\r
34         h0IagjelYOhH3FzY3cACUaSCS3VepEwRJ6tTzZM8WicT0uy4E2pMBS/7mwzFgZTkK7HD\r
35         HvDA==\r
36 Received: by 10.14.205.65 with SMTP id i41mr47519406eeo.2.1353946983405;\r
37         Mon, 26 Nov 2012 08:23:03 -0800 (PST)\r
38 Received: from localhost ([88.233.27.222])\r
39         by mx.google.com with ESMTPS id b2sm3544616eep.9.2012.11.26.08.23.01\r
40         (version=TLSv1/SSLv3 cipher=OTHER);\r
41         Mon, 26 Nov 2012 08:23:01 -0800 (PST)\r
42 Date: Mon, 26 Nov 2012 18:23:16 +0200\r
43 From: Ali Polatel <polatel@gmail.com>\r
44 To: Austin Clements <amdragon@MIT.EDU>\r
45 Subject: Re: [PATCH 6/6] ruby: Add bindings for notmuch_thread_get_messages\r
46 Message-ID: <20121126162316.GB5669@hayalet>\r
47 Mail-Followup-To: Austin Clements <amdragon@MIT.EDU>, notmuch@notmuchmail.org\r
48 References: <1353819427-13182-1-git-send-email-amdragon@mit.edu>\r
49         <1353819427-13182-7-git-send-email-amdragon@mit.edu>\r
50 MIME-Version: 1.0\r
51 Content-Type: multipart/signed; micalg=pgp-sha1;\r
52         protocol="application/pgp-signature"; boundary="LpQ9ahxlCli8rRTG"\r
53 Content-Disposition: inline\r
54 In-Reply-To: <1353819427-13182-7-git-send-email-amdragon@mit.edu>\r
55 Organization: Pink Floyd\r
56 User-Agent: Mutt/1.5.21 (2011-07-01)\r
57 Cc: notmuch@notmuchmail.org\r
58 X-BeenThere: notmuch@notmuchmail.org\r
59 X-Mailman-Version: 2.1.13\r
60 Precedence: list\r
61 List-Id: "Use and development of the notmuch mail system."\r
62         <notmuch.notmuchmail.org>\r
63 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
64         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
65 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
66 List-Post: <mailto:notmuch@notmuchmail.org>\r
67 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
68 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
69         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
70 X-List-Received-Date: Mon, 26 Nov 2012 16:23:05 -0000\r
71 \r
72 \r
73 --LpQ9ahxlCli8rRTG\r
74 Content-Type: text/plain; charset=us-ascii; format=flowed\r
75 Content-Disposition: inline\r
76 Content-Transfer-Encoding: quoted-printable\r
77 \r
78 LGTM. Thanks for showing love to the ruby bindings as I was away.\r
79 \r
80 On Sat, Nov 24, 2012 at 11:57:07PM -0500, Austin Clements wrote:\r
81 >---\r
82 > bindings/ruby/defs.h   |    3 +++\r
83 > bindings/ruby/init.c   |    1 +\r
84 > bindings/ruby/thread.c |   20 ++++++++++++++++++++\r
85 > 3 files changed, 24 insertions(+)\r
86 >\r
87 >diff --git a/bindings/ruby/defs.h b/bindings/ruby/defs.h\r
88 >index fe81b3f..5b44585 100644\r
89 >--- a/bindings/ruby/defs.h\r
90 >+++ b/bindings/ruby/defs.h\r
91 >@@ -262,6 +262,9 @@ VALUE\r
92 > notmuch_rb_thread_get_toplevel_messages (VALUE self);\r
93 >\r
94 > VALUE\r
95 >+notmuch_rb_thread_get_messages (VALUE self);\r
96 >+\r
97 >+VALUE\r
98 > notmuch_rb_thread_get_matched_messages (VALUE self);\r
99 >\r
100 > VALUE\r
101 >diff --git a/bindings/ruby/init.c b/bindings/ruby/init.c\r
102 >index f4931d3..663271d 100644\r
103 >--- a/bindings/ruby/init.c\r
104 >+++ b/bindings/ruby/init.c\r
105 >@@ -306,6 +306,7 @@ Init_notmuch (void)\r
106 >     rb_define_method (notmuch_rb_cThread, "thread_id", notmuch_rb_thread_=\r
107 get_thread_id, 0); /* in thread.c */\r
108 >     rb_define_method (notmuch_rb_cThread, "total_messages", notmuch_rb_th=\r
109 read_get_total_messages, 0); /* in thread.c */\r
110 >     rb_define_method (notmuch_rb_cThread, "toplevel_messages", notmuch_rb=\r
111 _thread_get_toplevel_messages, 0); /* in thread.c */\r
112 >+    rb_define_method (notmuch_rb_cThread, "messages", notmuch_rb_thread_g=\r
113 et_messages, 0); /* in thread.c */\r
114 >     rb_define_method (notmuch_rb_cThread, "matched_messages", notmuch_rb_=\r
115 thread_get_matched_messages, 0); /* in thread.c */\r
116 >     rb_define_method (notmuch_rb_cThread, "authors", notmuch_rb_thread_ge=\r
117 t_authors, 0); /* in thread.c */\r
118 >     rb_define_method (notmuch_rb_cThread, "subject", notmuch_rb_thread_ge=\r
119 t_subject, 0); /* in thread.c */\r
120 >diff --git a/bindings/ruby/thread.c b/bindings/ruby/thread.c\r
121 >index efe5aaf..56616d9 100644\r
122 >--- a/bindings/ruby/thread.c\r
123 >+++ b/bindings/ruby/thread.c\r
124 >@@ -92,6 +92,26 @@ notmuch_rb_thread_get_toplevel_messages (VALUE self)\r
125 > }\r
126 >\r
127 > /*\r
128 >+ * call-seq: THREAD.messages =3D> MESSAGES\r
129 >+ *\r
130 >+ * Get a Notmuch::Messages iterator for the all messages in thread.\r
131 >+ */\r
132 >+VALUE\r
133 >+notmuch_rb_thread_get_messages (VALUE self)\r
134 >+{\r
135 >+    notmuch_messages_t *messages;\r
136 >+    notmuch_thread_t *thread;\r
137 >+\r
138 >+    Data_Get_Notmuch_Thread (self, thread);\r
139 >+\r
140 >+    messages =3D notmuch_thread_get_messages (thread);\r
141 >+    if (!messages)\r
142 >+      rb_raise (notmuch_rb_eMemoryError, "Out of memory");\r
143 >+\r
144 >+    return Data_Wrap_Struct (notmuch_rb_cMessages, NULL, NULL, messages);\r
145 >+}\r
146 >+\r
147 >+/*\r
148 >  * call-seq: THREAD.matched_messages =3D> fixnum\r
149 >  *\r
150 >  * Get the number of messages in thread that matched the search\r
151 >--=20\r
152 >1.7.10.4\r
153 >\r
154 >_______________________________________________\r
155 >notmuch mailing list\r
156 >notmuch@notmuchmail.org\r
157 >http://notmuchmail.org/mailman/listinfo/notmuch\r
158 \r
159 --LpQ9ahxlCli8rRTG\r
160 Content-Type: application/pgp-signature\r
161 \r
162 -----BEGIN PGP SIGNATURE-----\r
163 Version: GnuPG v2.0.19 (GNU/Linux)\r
164 \r
165 iEYEARECAAYFAlCzl3QACgkQQU4yORhF8iCwrQCfbbu4SuiAV6UrlY9W57pG5lgP\r
166 IBoAoLwV0vDAS8RnHZoZeRz7Sgm+NMAL\r
167 =Lq/e\r
168 -----END PGP SIGNATURE-----\r
169 \r
170 --LpQ9ahxlCli8rRTG--\r