1 Return-Path: <amdragon@mit.edu>
\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 6BC45431FAF
\r
6 for <notmuch@notmuchmail.org>; Sun, 11 Mar 2012 16:34:14 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5
\r
12 tests=[RCVD_IN_DNSWL_LOW=-0.7] 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 PWvpXduA722L for <notmuch@notmuchmail.org>;
\r
16 Sun, 11 Mar 2012 16:34:13 -0700 (PDT)
\r
17 Received: from dmz-mailsec-scanner-8.mit.edu (DMZ-MAILSEC-SCANNER-8.MIT.EDU
\r
19 by olra.theworths.org (Postfix) with ESMTP id B9731431FAE
\r
20 for <notmuch@notmuchmail.org>; Sun, 11 Mar 2012 16:34:13 -0700 (PDT)
\r
21 X-AuditID: 12074425-b7f4a6d0000008e0-ea-4f5d36722f27
\r
22 Received: from mailhub-auth-3.mit.edu ( [18.9.21.43])
\r
23 by dmz-mailsec-scanner-8.mit.edu (Symantec Messaging Gateway) with SMTP
\r
24 id 20.E7.02272.2763D5F4; Sun, 11 Mar 2012 19:34:10 -0400 (EDT)
\r
25 Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103])
\r
26 by mailhub-auth-3.mit.edu (8.13.8/8.9.2) with ESMTP id q2BNYAQH008747;
\r
27 Sun, 11 Mar 2012 19:34:10 -0400
\r
28 Received: from awakening.csail.mit.edu (awakening.csail.mit.edu [18.26.4.91])
\r
29 (authenticated bits=0)
\r
30 (User authenticated as amdragon@ATHENA.MIT.EDU)
\r
31 by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id q2BNY8iB029746
\r
32 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);
\r
33 Sun, 11 Mar 2012 19:34:09 -0400 (EDT)
\r
34 Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.77)
\r
35 (envelope-from <amdragon@mit.edu>)
\r
36 id 1S6sHA-0002aS-6U; Sun, 11 Mar 2012 19:34:08 -0400
\r
37 From: Austin Clements <amdragon@MIT.EDU>
\r
38 To: Mark Walters <markwalters1009@gmail.com>, notmuch@notmuchmail.org
\r
39 Subject: Re: [PATCH v2 3/8] show: Allow formatters to return errors
\r
40 In-Reply-To: <87ipihbf0w.fsf@qmul.ac.uk>
\r
41 References: <1330752025-2542-1-git-send-email-amdragon@mit.edu>
\r
42 <1331059724-14653-1-git-send-email-amdragon@mit.edu>
\r
43 <1331059724-14653-4-git-send-email-amdragon@mit.edu>
\r
44 <87ipihbf0w.fsf@qmul.ac.uk>
\r
45 User-Agent: Notmuch/0.11.1+252~gdf1a6d5 (http://notmuchmail.org) Emacs/23.3.1
\r
47 Date: Sun, 11 Mar 2012 19:34:08 -0400
\r
48 Message-ID: <87wr6qsoen.fsf@awakening.csail.mit.edu>
\r
50 Content-Type: text/plain; charset=us-ascii
\r
51 X-Brightmail-Tracker:
\r
52 H4sIAAAAAAAAA+NgFnrIIsWRmVeSWpSXmKPExsUixCmqrVtkFutvsOiPscXquTwW12/OZHZg
\r
53 8tg56y67x7NVt5gDmKK4bFJSczLLUov07RK4MjburymYwF2x7eMt1gbGDxxdjJwcEgImEsuW
\r
54 XGWDsMUkLtxbD2RzcQgJ7GOU2PvxPguEs4FR4u2hV8wQzkkmibWPlkE5Sxgl5v39A9bPJqAh
\r
55 sW3/ckYQW0TAVeLpt8/MILawgLPEykl3WUFsTqCatSffsUI0H2WUeLz3FgtIQlQgUWJ9530m
\r
56 EJtFQFViz4rPYA28QAf2PpwCZQtKnJz5BKyeWUBL4sa/l0wTGAVmIUnNQpJawMi0ilE2JbdK
\r
57 NzcxM6c4NVm3ODkxLy+1SNdCLzezRC81pXQTIygk2V1UdzBOOKR0iFGAg1GJh5fLIMpfiDWx
\r
58 rLgy9xCjJAeTkihvhkmsvxBfUn5KZUZicUZ8UWlOavEhRgkOZiUR3oeGQDnelMTKqtSifJiU
\r
59 NAeLkjivptY7PyGB9MSS1OzU1ILUIpisDAeHkgRvtClQo2BRanpqRVpmTglCmomDE2Q4D9Dw
\r
60 bpAa3uKCxNzizHSI/ClGRSlx3hKQhABIIqM0D64XljJeMYoDvSLMWw9SxQNMN3Ddr4AGMwEN
\r
61 /swVDTK4JBEhJdXAaO5VnMU74Ud1pp/1nRK7z2YpzTv9NT50f/a2Oqlqc1NVNKNnW4HgwlTO
\r
62 1zpTNnr3bH45ue7u8ijloB9n1zFc9o5J9G1LjJldfePBxAnHr7Qu9QjJyhRy8f63fFVK5amJ
\r
63 BnFfApftl1Fbpjp9i9Oi5VYBszfecV+hdzZZ8dCSaZHhsi1KReWMSizFGYmGWsxFxYkAOQZx
\r
65 X-BeenThere: notmuch@notmuchmail.org
\r
66 X-Mailman-Version: 2.1.13
\r
68 List-Id: "Use and development of the notmuch mail system."
\r
69 <notmuch.notmuchmail.org>
\r
70 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
71 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
72 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
73 List-Post: <mailto:notmuch@notmuchmail.org>
\r
74 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
75 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
76 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
77 X-List-Received-Date: Sun, 11 Mar 2012 23:34:14 -0000
\r
79 On Tue, 06 Mar 2012 21:22:55 +0000, Mark Walters <markwalters1009@gmail.com> wrote:
\r
80 > On Tue, 6 Mar 2012 18:48:39 +0000, Austin Clements <amdragon@MIT.EDU> wrote:
\r
81 > > Formatter errors are propagated to the exit status of notmuch show.
\r
83 > > This isn't used by the JSON or text formatters, but it will be useful
\r
84 > > for the raw format, which is pickier.
\r
86 > I am not very familiar with this part of the code but the whole series
\r
89 > My only minor comment is that I like Tom's suggestion (in
\r
90 > id:"m2399qrtat.fsf@guru.guru-group.fi") of having NOTMUCH_STATUS_FAILURE
\r
91 > (= 1) to make the error handling look cleaner. Alternatively (or
\r
93 We could introduce a generic failure, though it couldn't be equal to 1
\r
94 without breaking binary compatibility. I'm not sure a generic failure
\r
95 would make things much better, though; as far as I can tell, error
\r
96 handling in C is doomed to ugliness.
\r
98 > possibly as well) the functions do_show and do_show_messages could pass
\r
99 > the actual error back up to notmuch_show_command and then that function
\r
100 > could convert return 0/1 as appropriate.
\r
102 I would be happy to be convinced either way. It's the way it is because
\r
103 I didn't bother changing it and because I think it's reasonable to think
\r
104 of do_show and do_show_messages as extensions of notmuch_show_command.
\r
106 > As usual I am quite happy to be overruled!
\r