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 91040431FC9
\r
6 for <notmuch@notmuchmail.org>; Mon, 7 May 2012 08:03:48 -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 saRnYI04txUL for <notmuch@notmuchmail.org>;
\r
18 Mon, 7 May 2012 08:03:46 -0700 (PDT)
\r
19 Received: from mail-wi0-f173.google.com (mail-wi0-f173.google.com
\r
20 [209.85.212.173]) (using TLSv1 with cipher RC4-SHA (128/128 bits))
\r
21 (No client certificate requested)
\r
22 by olra.theworths.org (Postfix) with ESMTPS id A5C95431FAE
\r
23 for <notmuch@notmuchmail.org>; Mon, 7 May 2012 08:03:42 -0700 (PDT)
\r
24 Received: by mail-wi0-f173.google.com with SMTP id hn9so512021wib.2
\r
25 for <notmuch@notmuchmail.org>; Mon, 07 May 2012 08:03:42 -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=KJ6dlpCBBO0JoABouOyzd3ETZF+RaIwFbLrah1ZwmU4=;
\r
30 b=LGMOcc71jMlTJx7Gx7I/Y/agiWfo/znXHYm6USkfQGhfmmdthicpQft1IbnvbCzpGj
\r
31 Zsq3LUmLbPLbqsYVB85hZm+WCQTfxekyBwR0PwqQmgTUK+sRUmJhaLBA0mSfXNH2l2xL
\r
32 +mkWfx4/JVRx9RVof4o9lVkIC9qjl6yoqoGAT4r0+DPObjWioGeYqJHnwRUf+dcK7Lge
\r
33 y5/SZiUgFzN0nEM3UY+VvIBqvIfWQXzthklVpZ5rG04Y7Up2h/vkaSljioBFAumCK5e/
\r
34 ltXvPfEAMLPVjemEsaTIB7/o3rjGID6XtAwkbPA0KyXFaYZOyQ1YoL1I6QDOGPCS7Ogb
\r
36 Received: by 10.180.76.232 with SMTP id n8mr14584451wiw.2.1336403022349;
\r
37 Mon, 07 May 2012 08:03:42 -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.41
\r
40 (version=TLSv1/SSLv3 cipher=OTHER);
\r
41 Mon, 07 May 2012 08:03:41 -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 4/4] ruby: Add wrapper for notmuch_query_set_omit_excluded()
\r
46 Date: Mon, 7 May 2012 18:02:46 +0300
\r
48 <397b5f460e19925d22a3c9ea5d81bb3fdc715029.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:49 -0000
\r
72 bindings/ruby/defs.h | 3 +++
\r
73 bindings/ruby/init.c | 7 +++++++
\r
74 bindings/ruby/query.c | 18 ++++++++++++++++++
\r
75 3 files changed, 28 insertions(+)
\r
77 diff --git a/bindings/ruby/defs.h b/bindings/ruby/defs.h
\r
78 index 6fe5787..85d8205 100644
\r
79 --- a/bindings/ruby/defs.h
\r
80 +++ b/bindings/ruby/defs.h
\r
81 @@ -220,6 +220,9 @@ VALUE
\r
82 notmuch_rb_query_add_tag_exclude (VALUE self, VALUE tagv);
\r
85 +notmuch_rb_query_set_omit_excluded (VALUE self, VALUE omitv);
\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 edcf101..3fe60fb 100644
\r
93 --- a/bindings/ruby/init.c
\r
94 +++ b/bindings/ruby/init.c
\r
95 @@ -96,6 +96,12 @@ Init_notmuch (void)
\r
97 rb_define_const (mod, "MESSAGE_FLAG_MATCH", INT2FIX (NOTMUCH_MESSAGE_FLAG_MATCH));
\r
99 + * Document-const: Notmuch::MESSAGE_FLAG_EXCLUDED
\r
101 + * Message flag "excluded"
\r
103 + rb_define_const (mod, "MESSAGE_FLAG_EXCLUDED", INT2FIX (NOTMUCH_MESSAGE_FLAG_EXCLUDED));
\r
105 * Document-const: Notmuch::TAG_MAX
\r
107 * Maximum allowed length of a tag
\r
108 @@ -235,6 +241,7 @@ Init_notmuch (void)
\r
109 rb_define_method (notmuch_rb_cQuery, "sort=", notmuch_rb_query_set_sort, 1); /* in query.c */
\r
110 rb_define_method (notmuch_rb_cQuery, "to_s", notmuch_rb_query_get_string, 0); /* in query.c */
\r
111 rb_define_method (notmuch_rb_cQuery, "add_tag_exclude", notmuch_rb_query_add_tag_exclude, 1); /* in query.c */
\r
112 + rb_define_method (notmuch_rb_cQuery, "omit_excluded=", notmuch_rb_query_set_omit_excluded, 1); /* in query.c */
\r
113 rb_define_method (notmuch_rb_cQuery, "search_threads", notmuch_rb_query_search_threads, 0); /* in query.c */
\r
114 rb_define_method (notmuch_rb_cQuery, "search_messages", notmuch_rb_query_search_messages, 0); /* in query.c */
\r
115 rb_define_method (notmuch_rb_cQuery, "count_messages", notmuch_rb_query_count_messages, 0); /* in query.c */
\r
116 diff --git a/bindings/ruby/query.c b/bindings/ruby/query.c
\r
117 index 2a80008..e5ba1b7 100644
\r
118 --- a/bindings/ruby/query.c
\r
119 +++ b/bindings/ruby/query.c
\r
120 @@ -107,6 +107,24 @@ notmuch_rb_query_add_tag_exclude (VALUE self, VALUE tagv)
\r
124 + * call-seq: QUERY.omit_excluded=(boolean) => nil
\r
126 + * Specify whether to omit excluded results or simply flag them.
\r
127 + * By default, this is set to +true+.
\r
130 +notmuch_rb_query_set_omit_excluded (VALUE self, VALUE omitv)
\r
132 + notmuch_query_t *query;
\r
134 + Data_Get_Notmuch_Query (self, query);
\r
136 + notmuch_query_set_omit_excluded (query, RTEST (omitv));
\r
142 * call-seq: QUERY.search_threads => THREADS
\r
144 * Search for threads
\r