Re: [PATCH] emacs: wash: make word-wrap bound message width
[notmuch-archives.git] / 0e / 57d3e1c808b7b1008de46567573e3a595aefe0
1 Return-Path: <alip@exherbo.org>\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 BBAD1431FB6\r
6         for <notmuch@notmuchmail.org>; Mon, 10 Jan 2011 06:39:29 -0800 (PST)\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
9 X-Spam-Flag: NO\r
10 X-Spam-Score: 0\r
11 X-Spam-Level: \r
12 X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
13         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 iJD4KgtISaZy for <notmuch@notmuchmail.org>;\r
17         Mon, 10 Jan 2011 06:39:28 -0800 (PST)\r
18 Received: from bach.exherbo.org (bach.exherbo.org [78.47.197.147])\r
19         (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))\r
20         (No client certificate requested)\r
21         by olra.theworths.org (Postfix) with ESMTPS id 51BD1431FD0\r
22         for <notmuch@notmuchmail.org>; Mon, 10 Jan 2011 06:39:27 -0800 (PST)\r
23 Received: from localhost ([127.0.0.1] helo=karatren.karatren.ev ident=alip)\r
24         by bach.exherbo.org with esmtpa (Exim 4.71)\r
25         (envelope-from <alip@exherbo.org>)\r
26         id 1PcIu0-0006iv-Pk; Mon, 10 Jan 2011 14:39:21 +0000\r
27 Received: by karatren.karatren.ev (Postfix, from userid 1000)\r
28         id 6150F1BAA28; Mon, 10 Jan 2011 16:39:28 +0200 (EET)\r
29 From: Ali Polatel <alip@exherbo.org>\r
30 To: notmuch@notmuchmail.org\r
31 Subject: [PATCH 2/4] ruby: Add wrappers for maildir sync. interface\r
32 Date: Mon, 10 Jan 2011 16:39:26 +0200\r
33 Message-Id:\r
34  <b958b56b5bfd9a30be0936a07416965b01c3029e.1294669955.git.alip@exherbo.org>\r
35 X-Mailer: git-send-email 1.7.3.5\r
36 In-Reply-To: <cover.1294669955.git.alip@exherbo.org>\r
37 References: <cover.1294669955.git.alip@exherbo.org>\r
38 In-Reply-To: <cover.1294669955.git.alip@exherbo.org>\r
39 References: <cover.1294669955.git.alip@exherbo.org>\r
40 Organization: Pink Floyd\r
41 X-BeenThere: notmuch@notmuchmail.org\r
42 X-Mailman-Version: 2.1.13\r
43 Precedence: list\r
44 List-Id: "Use and development of the notmuch mail system."\r
45         <notmuch.notmuchmail.org>\r
46 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
47         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
48 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
49 List-Post: <mailto:notmuch@notmuchmail.org>\r
50 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
51 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
52         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
53 X-List-Received-Date: Mon, 10 Jan 2011 14:39:30 -0000\r
54 \r
55 New wrappers:\r
56 notmuch_message_maildir_flags_to_tags(): MESSAGE.maildir_flags_to_tags\r
57 notmuch_message_tags_to_maildir_flags(): MESSAGE.tags_to_maildir_flags\r
58 ---\r
59  bindings/ruby/defs.h    |    6 ++++++\r
60  bindings/ruby/init.c    |    2 ++\r
61  bindings/ruby/message.c |   38 ++++++++++++++++++++++++++++++++++++++\r
62  3 files changed, 46 insertions(+), 0 deletions(-)\r
63 \r
64 diff --git a/bindings/ruby/defs.h b/bindings/ruby/defs.h\r
65 index db53096..1f52988 100644\r
66 --- a/bindings/ruby/defs.h\r
67 +++ b/bindings/ruby/defs.h\r
68 @@ -293,6 +293,12 @@ VALUE\r
69  notmuch_rb_message_remove_all_tags(VALUE self);\r
70  \r
71  VALUE\r
72 +notmuch_rb_message_maildir_flags_to_tags(VALUE self);\r
73 +\r
74 +VALUE\r
75 +notmuch_rb_message_tags_to_maildir_flags(VALUE self);\r
76 +\r
77 +VALUE\r
78  notmuch_rb_message_freeze(VALUE self);\r
79  \r
80  VALUE\r
81 diff --git a/bindings/ruby/init.c b/bindings/ruby/init.c\r
82 index 63ab205..4a63ba0 100644\r
83 --- a/bindings/ruby/init.c\r
84 +++ b/bindings/ruby/init.c\r
85 @@ -273,6 +273,8 @@ Init_notmuch(void)\r
86      rb_define_alias(notmuch_rb_cMessage, "<<", "add_tag");\r
87      rb_define_method(notmuch_rb_cMessage, "remove_tag", notmuch_rb_message_remove_tag, 1);\r
88      rb_define_method(notmuch_rb_cMessage, "remove_all_tags", notmuch_rb_message_remove_all_tags, 0);\r
89 +    rb_define_method(notmuch_rb_cMessage, "maildir_flags_to_tags", notmuch_rb_message_maildir_flags_to_tags, 0);\r
90 +    rb_define_method(notmuch_rb_cMessage, "tags_to_maildir_flags", notmuch_rb_message_tags_to_maildir_flags, 0);\r
91      rb_define_method(notmuch_rb_cMessage, "freeze", notmuch_rb_message_freeze, 0);\r
92      rb_define_method(notmuch_rb_cMessage, "thaw", notmuch_rb_message_thaw, 0);\r
93  \r
94 diff --git a/bindings/ruby/message.c b/bindings/ruby/message.c\r
95 index f97e1a4..1b2c01e 100644\r
96 --- a/bindings/ruby/message.c\r
97 +++ b/bindings/ruby/message.c\r
98 @@ -284,6 +284,44 @@ notmuch_rb_message_remove_all_tags(VALUE self)\r
99  }\r
100  \r
101  /*\r
102 + * call-seq: MESSAGE.maildir_flags_to_tags => true\r
103 + *\r
104 + * Add/remove tags according to maildir flags in the message filename(s)\r
105 + */\r
106 +VALUE\r
107 +notmuch_rb_message_maildir_flags_to_tags(VALUE self)\r
108 +{\r
109 +    notmuch_status_t ret;\r
110 +    notmuch_message_t *message;\r
111 +\r
112 +    Data_Get_Notmuch_Message(self, message);\r
113 +\r
114 +    ret = notmuch_message_maildir_flags_to_tags(message);\r
115 +    notmuch_rb_status_raise(ret);\r
116 +\r
117 +    return Qtrue;\r
118 +}\r
119 +\r
120 +/*\r
121 + * call-seq: MESSAGE.tags_to_maildir_flags => true\r
122 + *\r
123 + * Rename message filename(s) to encode tags as maildir flags\r
124 + */\r
125 +VALUE\r
126 +notmuch_rb_message_tags_to_maildir_flags(VALUE self)\r
127 +{\r
128 +    notmuch_status_t ret;\r
129 +    notmuch_message_t *message;\r
130 +\r
131 +    Data_Get_Notmuch_Message(self, message);\r
132 +\r
133 +    ret = notmuch_message_tags_to_maildir_flags(message);\r
134 +    notmuch_rb_status_raise(ret);\r
135 +\r
136 +    return Qtrue;\r
137 +}\r
138 +\r
139 +/*\r
140   * call-seq: MESSAGE.freeze => true\r
141   *\r
142   * Freeze the 'message'\r
143 -- \r
144 1.7.3.5\r
145 \r