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 C03D8431FDE
\r
6 for <notmuch@notmuchmail.org>; Mon, 7 May 2012 08:03:40 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
8 X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References"
\r
10 X-Spam-Score: -0.699
\r
12 X-Spam-Status: No, score=-0.699 tagged_above=-999 required=5
\r
13 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001,
\r
14 RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled
\r
15 Received: from olra.theworths.org ([127.0.0.1])
\r
16 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
17 with ESMTP id 6EQbIcSgZn2E for <notmuch@notmuchmail.org>;
\r
18 Mon, 7 May 2012 08:03:39 -0700 (PDT)
\r
19 Received: from mail-wg0-f45.google.com (mail-wg0-f45.google.com
\r
20 [74.125.82.45]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client
\r
21 certificate requested) by olra.theworths.org (Postfix) with ESMTPS id
\r
22 592E1431FAE for <notmuch@notmuchmail.org>; Mon, 7 May 2012 08:03:36 -0700
\r
24 Received: by mail-wg0-f45.google.com with SMTP id dt14so4053259wgb.2
\r
25 for <notmuch@notmuchmail.org>; Mon, 07 May 2012 08:03:36 -0700 (PDT)
\r
26 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
\r
27 h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to
\r
28 :references:in-reply-to:references:organization;
\r
29 bh=XvhQBKPShx6l/VogdD126fnI76wXC4VL7YkOji8DYts=;
\r
30 b=ANLHCxNFCnIBgO8gJTWnsYEse5aszT1XBrSdikVqIZM4G6L2qkTB2F78j5rMeQGAwM
\r
31 uxSCKnJs7IiWjZBpK/LVedEbYS2i3Q3XQpZjt30KfvvoUeSIx9iV9cPeLM8rO5oOnhpD
\r
32 pA9utJAwhfo05+BCzomkOmQLdzOp/GscdhDUyGHGIb7tzVSzIlr6/8UZwSuejmu8HoFH
\r
33 ieAa563L+JVRjPJPnRxX7uyPeG4TKs5myNZAdHKKP7zmPSEGOaXD3b+CLkXH3XeAwFlh
\r
34 pmGoeXImnim89RrquapziOE2I7LULRyjyq8jSB4mKgWONRsY6z05N/MzQ5mjhEIMVEKb
\r
36 Received: by 10.180.102.101 with SMTP id fn5mr7159033wib.6.1336403016067;
\r
37 Mon, 07 May 2012 08:03:36 -0700 (PDT)
\r
38 Received: from hayalet.ev ([88.234.38.242])
\r
39 by mx.google.com with ESMTPS id ff2sm34852610wib.9.2012.05.07.08.03.34
\r
40 (version=TLSv1/SSLv3 cipher=OTHER);
\r
41 Mon, 07 May 2012 08:03:35 -0700 (PDT)
\r
42 Sender: Ali Polatel <polatel@gmail.com>
\r
43 From: Ali Polatel <alip@exherbo.org>
\r
44 To: David Bremner <bremner@unb.ca>
\r
45 Subject: [PATCH 2/4] ruby: Add wrapper for notmuch_query_add_tag_exclude
\r
46 Date: Mon, 7 May 2012 18:02:44 +0300
\r
48 <9801542fe554d17264dab0b59bd8e478905b6d2c.1336402558.git.alip@exherbo.org>
\r
49 X-Mailer: git-send-email 1.7.10.1
\r
50 In-Reply-To: <cover.1336402558.git.alip@exherbo.org>
\r
51 References: <87txzsgs4g.fsf@zancas.localnet>
\r
52 <cover.1336402558.git.alip@exherbo.org>
\r
53 In-Reply-To: <cover.1336402558.git.alip@exherbo.org>
\r
54 References: <cover.1336402558.git.alip@exherbo.org>
\r
55 Organization: Pink Floyd
\r
56 Cc: Ali Polatel <alip@exherbo.org>, notmuch@notmuchmail.org
\r
57 X-BeenThere: notmuch@notmuchmail.org
\r
58 X-Mailman-Version: 2.1.13
\r
60 List-Id: "Use and development of the notmuch mail system."
\r
61 <notmuch.notmuchmail.org>
\r
62 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
63 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
64 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
65 List-Post: <mailto:notmuch@notmuchmail.org>
\r
66 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
67 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
68 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
69 X-List-Received-Date: Mon, 07 May 2012 15:03:41 -0000
\r
72 bindings/ruby/defs.h | 3 +++
\r
73 bindings/ruby/init.c | 1 +
\r
74 bindings/ruby/query.c | 18 ++++++++++++++++++
\r
75 3 files changed, 22 insertions(+)
\r
77 diff --git a/bindings/ruby/defs.h b/bindings/ruby/defs.h
\r
78 index 25222a6..a41cf10 100644
\r
79 --- a/bindings/ruby/defs.h
\r
80 +++ b/bindings/ruby/defs.h
\r
81 @@ -217,6 +217,9 @@ VALUE
\r
82 notmuch_rb_query_get_string (VALUE self);
\r
85 +notmuch_rb_query_add_tag_exclude (VALUE self, VALUE tagv);
\r
88 notmuch_rb_query_search_threads (VALUE self);
\r
91 diff --git a/bindings/ruby/init.c b/bindings/ruby/init.c
\r
92 index 7ad0ecf..edcf101 100644
\r
93 --- a/bindings/ruby/init.c
\r
94 +++ b/bindings/ruby/init.c
\r
95 @@ -234,6 +234,7 @@ Init_notmuch (void)
\r
96 rb_define_method (notmuch_rb_cQuery, "sort", notmuch_rb_query_get_sort, 0); /* in query.c */
\r
97 rb_define_method (notmuch_rb_cQuery, "sort=", notmuch_rb_query_set_sort, 1); /* in query.c */
\r
98 rb_define_method (notmuch_rb_cQuery, "to_s", notmuch_rb_query_get_string, 0); /* in query.c */
\r
99 + rb_define_method (notmuch_rb_cQuery, "add_tag_exclude", notmuch_rb_query_add_tag_exclude, 1); /* in query.c */
\r
100 rb_define_method (notmuch_rb_cQuery, "search_threads", notmuch_rb_query_search_threads, 0); /* in query.c */
\r
101 rb_define_method (notmuch_rb_cQuery, "search_messages", notmuch_rb_query_search_messages, 0); /* in query.c */
\r
102 rb_define_method (notmuch_rb_cQuery, "count_messages", notmuch_rb_query_count_messages, 0); /* in query.c */
\r
103 diff --git a/bindings/ruby/query.c b/bindings/ruby/query.c
\r
104 index 02b7819..2a80008 100644
\r
105 --- a/bindings/ruby/query.c
\r
106 +++ b/bindings/ruby/query.c
\r
107 @@ -89,6 +89,24 @@ notmuch_rb_query_get_string (VALUE self)
\r
111 + * call-seq: QUERY.add_tag_exclude(tag) => nil
\r
113 + * Add a tag that will be excluded from the query results by default.
\r
116 +notmuch_rb_query_add_tag_exclude (VALUE self, VALUE tagv)
\r
118 + notmuch_query_t *query;
\r
121 + Data_Get_Notmuch_Query (self, query);
\r
122 + tag = RSTRING_PTR(tagv);
\r
124 + notmuch_query_add_tag_exclude(query, tag);
\r
129 * call-seq: QUERY.search_threads => THREADS
\r
131 * Search for threads
\r