[feature request] emacs: use `notmuch insert` for FCC
[notmuch-archives.git] / 74 / 763ac9f32549ae66233379cc920771e78e6be2
1 Return-Path: <pioto@pioto.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 F01BB4196F0\r
6         for <notmuch@notmuchmail.org>; Thu,  8 Apr 2010 12:39:38 -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.5\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-0.5 tagged_above=-999 required=5\r
12         tests=[BAYES_05=-0.5] autolearn=ham\r
13 Received: from olra.theworths.org ([127.0.0.1])\r
14         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
15         with ESMTP id pFZue1C2C9A0 for <notmuch@notmuchmail.org>;\r
16         Thu,  8 Apr 2010 12:39:38 -0700 (PDT)\r
17 Received: from everglades.pioto.org (everglades.pioto.org [207.192.69.249])\r
18         by olra.theworths.org (Postfix) with ESMTP id 3EC8F431FC1\r
19         for <notmuch@notmuchmail.org>; Thu,  8 Apr 2010 12:39:38 -0700 (PDT)\r
20 Received: from aether.pioto.org (pool-96-236-149-110.pitbpa.fios.verizon.net\r
21         [96.236.149.110]) (Authenticated sender: pioto)\r
22         by everglades.pioto.org (Postfix) with ESMTPA id 8211916053F;\r
23         Thu,  8 Apr 2010 15:39:37 -0400 (EDT)\r
24 Received: by aether.pioto.org (Postfix, from userid 1000)\r
25         id 9E1AE6B08C; Thu,  8 Apr 2010 15:40:41 -0400 (EDT)\r
26 From: Mike Kelly <pioto@pioto.org>\r
27 To: notmuch@notmuchmail.org\r
28 Subject: [PATCH] Have notmuch count default to showing the total.\r
29 Date: Thu,  8 Apr 2010 15:39:38 -0400\r
30 Message-Id: <1270755578-23725-1-git-send-email-pioto@pioto.org>\r
31 X-Mailer: git-send-email 1.7.0.4\r
32 X-BeenThere: notmuch@notmuchmail.org\r
33 X-Mailman-Version: 2.1.13\r
34 Precedence: list\r
35 List-Id: "Use and development of the notmuch mail system."\r
36         <notmuch.notmuchmail.org>\r
37 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
38         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
39 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
40 List-Post: <mailto:notmuch@notmuchmail.org>\r
41 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
42 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
43         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
44 X-List-Received-Date: Thu, 08 Apr 2010 19:39:39 -0000\r
45 \r
46 If no parameters are given to notmuch-count, or just '' or '*' are\r
47 given, return the total number of messages in the database.\r
48 \r
49 update notmuch count help\r
50 ---\r
51  notmuch-count.c |    5 ++---\r
52  notmuch.c       |    4 ++++\r
53  2 files changed, 6 insertions(+), 3 deletions(-)\r
54 \r
55 diff --git a/notmuch-count.c b/notmuch-count.c\r
56 index 77aa433..97242ab 100644\r
57 --- a/notmuch-count.c\r
58 +++ b/notmuch-count.c\r
59 @@ -90,9 +90,8 @@ notmuch_count_command (void *ctx, int argc, char *argv[])\r
60         fprintf (stderr, "Out of memory.\n");\r
61         return 1;\r
62      }\r
63 -    if (*query_str == '\0') {\r
64 -       fprintf (stderr, "Error: notmuch count requires at least one count term.\n");\r
65 -       return 1;\r
66 +    if (*query_str == '\0' || (*query_str == '*' && *(query_str+1) == '\0')) {\r
67 +       query_str = talloc_strdup (ctx, "");\r
68      }\r
69  \r
70      query = notmuch_query_create (notmuch, query_str);\r
71 diff --git a/notmuch.c b/notmuch.c\r
72 index f5669fc..8650951 100644\r
73 --- a/notmuch.c\r
74 +++ b/notmuch.c\r
75 @@ -220,6 +220,10 @@ command_t commands[] = {\r
76        "\tof messages matching both a specific tag and either inbox\n"\r
77        "\tor unread\n"\r
78        "\n"\r
79 +      "\tIf no parameters are given, or the special search terms '' or\n"\r
80 +      "\t'*' are given, it will display the total number of messages in\n"\r
81 +      "\tthe database.\n"\r
82 +      "\n"\r
83        "\tSee \"notmuch help search-terms\" for details of the search\n"\r
84        "\t\tterms syntax." },\r
85      { "reply", notmuch_reply_command,\r
86 -- \r
87 1.7.0.4\r
88 \r