Re: [PATCH v4 04/16] Provide _notmuch_crypto_{set,get}_gpg_path
[notmuch-archives.git] / 9f / 0af7888797e133d467f1aaf0ca95fec21aad8f
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 1E712431FAF\r
6         for <notmuch@notmuchmail.org>; Sun,  7 Jul 2013 03:21:57 -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 tKmgjLZmK-Fz for <notmuch@notmuchmail.org>;\r
17         Sun,  7 Jul 2013 03:21:49 -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 03544431FAE\r
22         for <notmuch@notmuchmail.org>; Sun,  7 Jul 2013 03:21:48 -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 1Uvm69-0008Th-43; Sun, 07 Jul 2013 11:21:43 +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 1Uvm68-0000k1-PQ; Sun, 07 Jul 2013 11:21:41 +0100\r
31 From: Mark Walters <markwalters1009@gmail.com>\r
32 To: Tomi Ollila <tomi.ollila@iki.fi>, notmuch@notmuchmail.org\r
33 Subject: Re: [PATCH] emacs: hello: make --batch error gracefully\r
34 In-Reply-To: <m2mwq0t5v5.fsf@guru.guru-group.fi>\r
35 References: <1372976299-30389-1-git-send-email-markwalters1009@gmail.com>\r
36         <m2mwq0t5v5.fsf@guru.guru-group.fi>\r
37 User-Agent: Notmuch/0.15.2+192~g8222af3 (http://notmuchmail.org) Emacs/23.4.1\r
38         (i486-pc-linux-gnu)\r
39 Date: Sun, 07 Jul 2013 11:21:39 +0100\r
40 Message-ID: <87wqp2d618.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: 06ab073cf17d9903f4bc03239633d510 (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. Summary of the scoring: \r
52         * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail\r
53         provider *      (markwalters1009[at]gmail.com)\r
54         *  0.0 AWL AWL: From: address is in the auto white-list\r
55 X-QM-Scan-Virus: ClamAV says the message is clean\r
56 X-BeenThere: notmuch@notmuchmail.org\r
57 X-Mailman-Version: 2.1.13\r
58 Precedence: list\r
59 List-Id: "Use and development of the notmuch mail system."\r
60         <notmuch.notmuchmail.org>\r
61 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
62         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
63 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
64 List-Post: <mailto:notmuch@notmuchmail.org>\r
65 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
66 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
67         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
68 X-List-Received-Date: Sun, 07 Jul 2013 10:21:57 -0000\r
69 \r
70 \r
71 Hi\r
72 Tomi Ollila <tomi.ollila@iki.fi> writes:\r
73 \r
74 > On Fri, Jul 05 2013, Mark Walters <markwalters1009@gmail.com> wrote:\r
75 >\r
76 >> Recently notmuch-hello was converted to use batch count. However, it\r
77 >> seems that several people run different versions of notmuch-emacs and\r
78 >> notmuch-cli so this batch makes emacs fail with an error message if\r
79 >> --batch is not available in the CLI.\r
80 >> ---\r
81 >> There have been two cases on irc of people getting backtraces when\r
82 >> hitting this problem so it might be worth adding an informative error\r
83 >> message.\r
84 >\r
85 > This change takes care of the mismatching version problem now -- for\r
86 > a short while in most cases but in the future we might face with new\r
87 > incompabilities that would -- again -- need new solution. Some day\r
88 > we might have a pile of these who everyone is shy to remove from the\r
89 > code base ;/\r
90 \r
91 I think we want the unless clause anyway: we do not want to try parsing\r
92 something and getting stacktrace errors whatever happens. The error\r
93 message will need updating so I should probably add a FIXME to the\r
94 code. Perhaps the patch roughly as is could be applied to 0.16 and the\r
95 fixed error message together with your ideas from below to master?\r
96 \r
97 > Although I am not against applying this patch (if there are supporters\r
98 > of this) I'd like to concentrate fixing this for example the following\r
99 > way:\r
100 \r
101 This looks good. Some thoughts below.\r
102 \r
103 > We'll add a global option to notmuch, e.g.\r
104 >\r
105 > --compatibility-version=x.y\r
106 >\r
107 > Whenever the caller chooses to use this option, notmuch checks whether\r
108 > it can comply with the option -- it it can, execution continues, otherwise \r
109 > aborts.\r
110 \r
111 I think the return value could indicate what the problem was (ie too new\r
112 or too old): so frontends could decide to work around it (perhaps 22 and\r
113 23 to come after the format-version return values). This would mean that\r
114 callers would have an easier way of telling if --compatability-version\r
115 is supported at all to ease the transition.\r
116 \r
117 I wondered whether it overlapped with Austin's format-version stuff but\r
118 I think it is sufficiently different but some clear documentation as to\r
119 which means what could be helpful.\r
120 \r
121 Best wishes\r
122 \r
123 Mark\r
124 \r
125 > The compatibility is determined so that the major 'x' needs to be same\r
126 > and caller may have lower 'y' that notmuch is capable of handling.\r
127 >\r
128 > For example. if notmuch compatibility version was 2.5\r
129 >\r
130 > --compatibility-version=1.9  --  abort\r
131 > --compatibility-version=2.3  --  continue\r
132 > --compatibility-version=2.5  --  continue\r
133 > --compatibility-version=2.8  --  abort\r
134 > --compatibility-version=3.1  --  abort\r
135 >\r
136 >\r
137 > I can work on this (or on something similar) if this is generally thought\r
138 > as a good idea...\r
139 >\r
140 >>\r
141 >> Best wishes\r
142 >>\r
143 >> Mark\r
144 >\r
145 > Tomi\r
146 >\r
147 >\r
148 >>\r
149 >>  emacs/notmuch-hello.el |    9 +++++++--\r
150 >>  1 files changed, 7 insertions(+), 2 deletions(-)\r
151 >>\r
152 >> diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el\r
153 >> index 147c08c..fa46b7a 100644\r
154 >> --- a/emacs/notmuch-hello.el\r
155 >> +++ b/emacs/notmuch-hello.el\r
156 >> @@ -402,8 +402,13 @@ options will be handled as specified for\r
157 >>                                         (plist-get options :filter)))\r
158 >>       "\n")))\r
159 >>  \r
160 >> -    (call-process-region (point-min) (point-max) notmuch-command\r
161 >> -                     t t nil "count" "--batch")\r
162 >> +    (unless (= (call-process-region (point-min) (point-max) notmuch-command\r
163 >> +                                t t nil "count" "--batch") 0)\r
164 >> +      (notmuch-logged-error "notmuch CLI version mismatch error (count --batch)\r
165 >> +The most likely cause of this error is that the CLI is too old\r
166 >> +to support count --batch and needs to be upgraded to the same\r
167 >> +version as notmuch-emacs"))\r
168 >> +\r
169 >>      (goto-char (point-min))\r
170 >>  \r
171 >>      (notmuch-remove-if-not\r
172 >> -- \r
173 >> 1.7.9.1\r
174 >>\r
175 >> _______________________________________________\r
176 >> notmuch mailing list\r
177 >> notmuch@notmuchmail.org\r
178 >> http://notmuchmail.org/mailman/listinfo/notmuch\r