Re: [PATCH 1/2] Add Google Inc. to AUTHORS as a contributor.
[notmuch-archives.git] / 11 / 779c142c4f994e45ae43b341fe06e25e5b432b
1 Return-Path: <david@tethera.net>\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 443A2431FBC\r
6         for <notmuch@notmuchmail.org>; Tue, 23 Jul 2013 19:28:24 -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\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
12         autolearn=disabled\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 8RtezQZbH6Ir for <notmuch@notmuchmail.org>;\r
16         Tue, 23 Jul 2013 19:28:19 -0700 (PDT)\r
17 Received: from yantan.tethera.net (yantan.tethera.net [199.188.72.155])\r
18         (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits))\r
19         (No client certificate requested)\r
20         by olra.theworths.org (Postfix) with ESMTPS id 8B88E431FB6\r
21         for <notmuch@notmuchmail.org>; Tue, 23 Jul 2013 19:28:19 -0700 (PDT)\r
22 Received: from remotemail by yantan.tethera.net with local (Exim 4.80)\r
23         (envelope-from <david@tethera.net>)\r
24         id 1V1ooI-000278-Rt; Tue, 23 Jul 2013 23:28:14 -0300\r
25 Received: (nullmailer pid 23197 invoked by uid 1000); Wed, 24 Jul 2013\r
26         02:28:11 -0000\r
27 From: David Bremner <david@tethera.net>\r
28 To: Mark Walters <markwalters1009@gmail.com>\r
29 Subject: Re: [PATCH] emacs: hello: make --batch error gracefully\r
30 In-Reply-To: <1372976299-30389-1-git-send-email-markwalters1009@gmail.com>\r
31 References: <1372976299-30389-1-git-send-email-markwalters1009@gmail.com>\r
32 User-Agent: Notmuch/0.15.2 (http://notmuchmail.org) Emacs/24.3.1\r
33         (x86_64-pc-linux-gnu)\r
34 Date: Tue, 23 Jul 2013 23:28:11 -0300\r
35 Message-ID: <87ob9svghw.fsf@zancas.localnet>\r
36 MIME-Version: 1.0\r
37 Content-Type: text/plain\r
38 Cc: notmuch mailing list <notmuch@notmuchmail.org>\r
39 X-BeenThere: notmuch@notmuchmail.org\r
40 X-Mailman-Version: 2.1.13\r
41 Precedence: list\r
42 List-Id: "Use and development of the notmuch mail system."\r
43         <notmuch.notmuchmail.org>\r
44 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
45         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
46 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
47 List-Post: <mailto:notmuch@notmuchmail.org>\r
48 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
49 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
50         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
51 X-List-Received-Date: Wed, 24 Jul 2013 02:28:24 -0000\r
52 \r
53 Mark Walters <markwalters1009@gmail.com> writes:\r
54 > -    (call-process-region (point-min) (point-max) notmuch-command\r
55 > -                      t t nil "count" "--batch")\r
56 > +    (unless (= (call-process-region (point-min) (point-max) notmuch-command\r
57 > +                                 t t nil "count" "--batch") 0)\r
58 > +      (notmuch-logged-error "notmuch CLI version mismatch error (count --batch)\r
59 > +The most likely cause of this error is that the CLI is too old\r
60 > +to support count --batch and needs to be upgraded to the same\r
61 > +version as notmuch-emacs"))\r
62 > +\r
63 \r
64 I had a look at this, and I agree the current failure mode is not nice\r
65 (it just says something mysterious about nil not being a string). On the\r
66 other hand, I think we should use the two argument form of\r
67 notmuch-logged-error, and the the first argument should say only what we\r
68 know. Something like\r
69 \r
70 (notmuch-logged-error "notmuch count --batch failed"\r
71 "notmuch count --batch failed\r
72 Please check that the notmuch CLI is new enough to  support `count\r
73 --batch'. In general we recommend running matching versions of the CLI\r
74 and emacs interface.")\r
75 \r
76 d\r
77 \r