Re: [PATCH] lib: reword comment about XFOLDER: prefix
[notmuch-archives.git] / 98 / f0ea40a873b8c05171ed39c61e7a770922828c
1 Return-Path: <m.walters@qmul.ac.uk>\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 07EF8431FB6\r
6         for <notmuch@notmuchmail.org>; Fri, 21 Jun 2013 23:50:20 -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: -1.098\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-1.098 tagged_above=-999 required=5\r
12         tests=[DKIM_ADSP_CUSTOM_MED=0.001, FREEMAIL_FROM=0.001,\r
13         NML_ADSP_CUSTOM_MED=1.2, RCVD_IN_DNSWL_MED=-2.3] 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 iowm1FtpDtXq for <notmuch@notmuchmail.org>;\r
17         Fri, 21 Jun 2013 23:50:12 -0700 (PDT)\r
18 Received: from mail2.qmul.ac.uk (mail2.qmul.ac.uk [138.37.6.6])\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 E540C431FAE\r
22         for <notmuch@notmuchmail.org>; Fri, 21 Jun 2013 23:50:11 -0700 (PDT)\r
23 Received: from smtp.qmul.ac.uk ([138.37.6.40])\r
24         by mail2.qmul.ac.uk with esmtp (Exim 4.71)\r
25         (envelope-from <m.walters@qmul.ac.uk>)\r
26         id 1UqHe7-0008PS-R0; Sat, 22 Jun 2013 07:50:06 +0100\r
27 Received: from 93-97-24-31.zone5.bethere.co.uk ([93.97.24.31] helo=localhost)\r
28         by smtp.qmul.ac.uk with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.71)\r
29         (envelope-from <m.walters@qmul.ac.uk>)\r
30         id 1UqHe7-0007bh-Gm; Sat, 22 Jun 2013 07:50:03 +0100\r
31 From: Mark Walters <markwalters1009@gmail.com>\r
32 To: Peter Wang <novalazy@gmail.com>, notmuch@notmuchmail.org\r
33 Subject: Re: [PATCH v6 01/12] tag-util: move out 'tag' command-line checks\r
34 In-Reply-To: <1371880008-18312-2-git-send-email-novalazy@gmail.com>\r
35 References: <1371880008-18312-1-git-send-email-novalazy@gmail.com>\r
36         <1371880008-18312-2-git-send-email-novalazy@gmail.com>\r
37 User-Agent: Notmuch/0.15.2+171~ge2f30a2 (http://notmuchmail.org) Emacs/23.4.1\r
38         (x86_64-pc-linux-gnu)\r
39 Date: Sat, 22 Jun 2013 07:50:00 +0100\r
40 Message-ID: <87ppvevduv.fsf@qmul.ac.uk>\r
41 MIME-Version: 1.0\r
42 Content-Type: text/plain; charset=us-ascii\r
43 X-Sender-Host-Address: 93.97.24.31\r
44 X-QM-SPAM-Info: Sender has good ham record.  :)\r
45 X-QM-Body-MD5: 7062fce1babddeb672b6ec6050de6852 (of first 20000 bytes)\r
46 X-SpamAssassin-Score: -0.0\r
47 X-SpamAssassin-SpamBar: /\r
48 X-SpamAssassin-Report: The QM spam filters have analysed this message to\r
49         determine if it is\r
50         spam. We require at least 5.0 points to mark a message as spam.\r
51         This message scored -0.0 points.\r
52         Summary of the scoring: \r
53         * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail\r
54         provider *      (markwalters1009[at]gmail.com)\r
55         * -0.0 AWL AWL: From: address is in the auto white-list\r
56 X-QM-Scan-Virus: ClamAV says the message is clean\r
57 X-BeenThere: notmuch@notmuchmail.org\r
58 X-Mailman-Version: 2.1.13\r
59 Precedence: list\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: Sat, 22 Jun 2013 06:50:20 -0000\r
70 \r
71 \r
72 \r
73 I am working my way through the series: I have done everything except\r
74 the main patch (3/12). As I think one more series is needed please can you\r
75 update this commit message as it is now only moving one error condition\r
76 (since Jani already moved the other)\r
77 \r
78 > parse_tag_command_line checked for two error conditions which are\r
79 > specific to the 'tag' command.  It can be reused for the forthcoming\r
80 > notmuch 'insert' command if we move the checks out, into notmuch-tag.c.\r
81 \r
82 Best wishes\r
83 \r
84 Mark\r
85  \r
86 \r
87 > ---\r
88 >  notmuch-tag.c | 5 +++++\r
89 >  tag-util.c    | 6 +++---\r
90 >  2 files changed, 8 insertions(+), 3 deletions(-)\r
91 >\r
92 > diff --git a/notmuch-tag.c b/notmuch-tag.c\r
93 > index 9a5d3e7..3b09df9 100644\r
94 > --- a/notmuch-tag.c\r
95 > +++ b/notmuch-tag.c\r
96 > @@ -247,6 +247,11 @@ notmuch_tag_command (notmuch_config_t *config, int argc, char *argv[])\r
97 >           fprintf (stderr, "Error: 'notmuch tag' requires at least one tag to add or remove.\n");\r
98 >           return 1;\r
99 >       }\r
100 > +\r
101 > +     if (*query_string == '\0') {\r
102 > +         fprintf (stderr, "Error: notmuch tag requires at least one search term.\n");\r
103 > +         return 1;\r
104 > +     }\r
105 >      }\r
106 >  \r
107 >      if (notmuch_database_open (notmuch_config_get_database_path (config),\r
108 > diff --git a/tag-util.c b/tag-util.c\r
109 > index c5f5859..92e08a1 100644\r
110 > --- a/tag-util.c\r
111 > +++ b/tag-util.c\r
112 > @@ -190,9 +190,9 @@ parse_tag_command_line (void *ctx, int argc, char **argv,\r
113 >  \r
114 >      *query_str = query_string_from_args (ctx, argc - i, &argv[i]);\r
115 >  \r
116 > -    if (*query_str == NULL || **query_str == '\0') {\r
117 > -     fprintf (stderr, "Error: notmuch tag requires at least one search term.\n");\r
118 > -     return TAG_PARSE_INVALID;\r
119 > +    if (*query_str == NULL) {\r
120 > +     fprintf (stderr, "Out of memory.\n");\r
121 > +     return TAG_PARSE_OUT_OF_MEMORY;\r
122 >      }\r
123 >  \r
124 >      return TAG_PARSE_SUCCESS;\r
125 > -- \r
126 > 1.7.12.1\r
127 >\r
128 > _______________________________________________\r
129 > notmuch mailing list\r
130 > notmuch@notmuchmail.org\r
131 > http://notmuchmail.org/mailman/listinfo/notmuch\r