Re: [PATCH v2] VIM: Use notmuch CLI for config
[notmuch-archives.git] / ab / 8048bcbe71435c1e452648165bd458703e5fd8
1 Return-Path: <novalazy@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 2483A431FAF\r
6         for <notmuch@notmuchmail.org>; Wed, 25 Jul 2012 06:43:07 -0700 (PDT)\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 1NNfBM6iTjWP for <notmuch@notmuchmail.org>;\r
17         Wed, 25 Jul 2012 06:43:06 -0700 (PDT)\r
18 Received: from mail-gh0-f181.google.com (mail-gh0-f181.google.com\r
19         [209.85.160.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 684CD431FAE\r
22         for <notmuch@notmuchmail.org>; Wed, 25 Jul 2012 06:43:06 -0700 (PDT)\r
23 Received: by ghbz13 with SMTP id z13so890675ghb.26\r
24         for <notmuch@notmuchmail.org>; Wed, 25 Jul 2012 06:43:05 -0700 (PDT)\r
25 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;\r
26         h=from:to:cc:subject:date:message-id:x-mailer:mime-version\r
27         :content-type:content-transfer-encoding;\r
28         bh=jXneYX2KpAeXbMwDVDGjQyqmb7saJBeJvQFZ/22y9ps=;\r
29         b=EiLRqdhRqN0kriOOC1c/yGqBn1OPSwPOevwkPMBy4UWwHxK4gugiv5uNwj6zJjaamw\r
30         Q9HxY0VxNZGfglt/FFdTTGiEkR4H1lndOPYnzhoK5jkr9I5tPBr3TQqgHybBvKNbKcMZ\r
31         JYGNQhZZkSvf4pDCUfzwYk4+BoXG0Y5XYIh9HhrgF1IQv+w4/E1tBEFb9YeyWah2XAKx\r
32         aygcpf01Hp/GL/JgcWWfJoRPRQF3zqJwegxcJpkkCVkrUXXpG1VICfyLIdetCbHi2/vP\r
33         R9SywkJiLby3kAdfZANRdQqQKCMUY6zKgeBLIC5dBUVudkGCJ6hd4yQDUsdu2szqVQkm\r
34         2umQ==\r
35 Received: by 10.66.83.33 with SMTP id n1mr12805910pay.7.1343223785098;\r
36         Wed, 25 Jul 2012 06:43:05 -0700 (PDT)\r
37 Received: from localhost (215.42.233.220.static.exetel.com.au.\r
38         [220.233.42.215])\r
39         by mx.google.com with ESMTPS id nu5sm14408913pbb.53.2012.07.25.06.43.02\r
40         (version=TLSv1/SSLv3 cipher=OTHER);\r
41         Wed, 25 Jul 2012 06:43:04 -0700 (PDT)\r
42 From: Peter Wang <novalazy@gmail.com>\r
43 To: notmuch@notmuchmail.org\r
44 Subject: [PATCH 01/18] cli: add stub for insert command\r
45 Date: Wed, 25 Jul 2012 23:42:30 +1000\r
46 Message-Id: <1343223767-9812-1-git-send-email-novalazy@gmail.com>\r
47 X-Mailer: git-send-email 1.7.4.4\r
48 MIME-Version: 1.0\r
49 Content-Type: text/plain; charset=UTF-8\r
50 Content-Transfer-Encoding: 8bit\r
51 X-BeenThere: notmuch@notmuchmail.org\r
52 X-Mailman-Version: 2.1.13\r
53 Precedence: list\r
54 List-Id: "Use and development of the notmuch mail system."\r
55         <notmuch.notmuchmail.org>\r
56 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
57         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
58 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
59 List-Post: <mailto:notmuch@notmuchmail.org>\r
60 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
61 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
62         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
63 X-List-Received-Date: Wed, 25 Jul 2012 13:43:07 -0000\r
64 \r
65 This does nothing yet.\r
66 ---\r
67  Makefile.local   |    1 +\r
68  notmuch-client.h |    3 +++\r
69  notmuch-insert.c |   27 +++++++++++++++++++++++++++\r
70  notmuch.c        |    3 +++\r
71  4 files changed, 34 insertions(+), 0 deletions(-)\r
72  create mode 100644 notmuch-insert.c\r
73 \r
74 diff --git a/Makefile.local b/Makefile.local\r
75 index 296995d..950f046 100644\r
76 --- a/Makefile.local\r
77 +++ b/Makefile.local\r
78 @@ -282,6 +282,7 @@ notmuch_client_srcs =               \\r
79         notmuch-config.c        \\r
80         notmuch-count.c         \\r
81         notmuch-dump.c          \\r
82 +       notmuch-insert.c        \\r
83         notmuch-new.c           \\r
84         notmuch-reply.c         \\r
85         notmuch-restore.c       \\r
86 diff --git a/notmuch-client.h b/notmuch-client.h\r
87 index f930798..edbd3ee 100644\r
88 --- a/notmuch-client.h\r
89 +++ b/notmuch-client.h\r
90 @@ -132,6 +132,9 @@ int\r
91  notmuch_dump_command (void *ctx, int argc, char *argv[]);\r
92  \r
93  int\r
94 +notmuch_insert_command (void *ctx, int argc, char *argv[]);\r
95 +\r
96 +int\r
97  notmuch_new_command (void *ctx, int argc, char *argv[]);\r
98  \r
99  int\r
100 diff --git a/notmuch-insert.c b/notmuch-insert.c\r
101 new file mode 100644\r
102 index 0000000..0e061a0\r
103 --- /dev/null\r
104 +++ b/notmuch-insert.c\r
105 @@ -0,0 +1,27 @@\r
106 +/* notmuch - Not much of an email program, (just index and search)\r
107 + *\r
108 + * Copyright © 2012 Peter Wang\r
109 + *\r
110 + * This program is free software: you can redistribute it and/or modify\r
111 + * it under the terms of the GNU General Public License as published by\r
112 + * the Free Software Foundation, either version 3 of the License, or\r
113 + * (at your option) any later version.\r
114 + *\r
115 + * This program is distributed in the hope that it will be useful,\r
116 + * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
117 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
118 + * GNU General Public License for more details.\r
119 + *\r
120 + * You should have received a copy of the GNU General Public License\r
121 + * along with this program.  If not, see http://www.gnu.org/licenses/ .\r
122 + *\r
123 + * Author: Peter Wang <novalazy@gmail.com>\r
124 + */\r
125 +\r
126 +#include "notmuch-client.h"\r
127 +\r
128 +int\r
129 +notmuch_insert_command (void *ctx, int argc, char *argv[])\r
130 +{\r
131 +    return 1;\r
132 +}\r
133 diff --git a/notmuch.c b/notmuch.c\r
134 index 477a09c..86239fd 100644\r
135 --- a/notmuch.c\r
136 +++ b/notmuch.c\r
137 @@ -53,6 +53,9 @@ static command_t commands[] = {\r
138      { "new", notmuch_new_command,\r
139        "[options...]",\r
140        "Find and import new messages to the notmuch database." },\r
141 +    { "insert", notmuch_insert_command,\r
142 +      "[options...] [--] [+<tag>|-<tag> ...] < message",\r
143 +      "Add a new message into the maildir and notmuch database." },\r
144      { "search", notmuch_search_command,\r
145        "[options...] <search-terms> [...]",\r
146        "Search for messages matching the given search terms." },\r
147 -- \r
148 1.7.4.4\r
149 \r