Re: [PATCH v4 01/16] add util/search-path.{c, h} to test for executables in $PATH
[notmuch-archives.git] / 47 / 710eb84c46fb4f1a0da6b187f2dd30a0b558e5
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 44292431FAF\r
6         for <notmuch@notmuchmail.org>; Tue, 13 Mar 2012 19:47:18 -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.7\r
10 X-Spam-Level: \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 WLcnNozfva6h for <notmuch@notmuchmail.org>;\r
16         Tue, 13 Mar 2012 19:47:17 -0700 (PDT)\r
17 Received: from dmz-mailsec-scanner-3.mit.edu (DMZ-MAILSEC-SCANNER-3.MIT.EDU\r
18         [18.9.25.14])\r
19         by olra.theworths.org (Postfix) with ESMTP id C24F7431FAE\r
20         for <notmuch@notmuchmail.org>; Tue, 13 Mar 2012 19:47:17 -0700 (PDT)\r
21 X-AuditID: 1209190e-b7f7c6d0000008c3-47-4f6006b5703a\r
22 Received: from mailhub-auth-3.mit.edu ( [18.9.21.43])\r
23         by dmz-mailsec-scanner-3.mit.edu (Symantec Messaging Gateway) with SMTP\r
24         id 46.03.02243.5B6006F4; Tue, 13 Mar 2012 22:47:17 -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 q2E2lHmi020042; \r
27         Tue, 13 Mar 2012 22:47:17 -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 q2E2lGle026400\r
32         (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);\r
33         Tue, 13 Mar 2012 22:47:16 -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 1S7eFA-0005wS-1o; Tue, 13 Mar 2012 22:47:16 -0400\r
37 Date: Tue, 13 Mar 2012 22:47:16 -0400\r
38 From: Austin Clements <amdragon@MIT.EDU>\r
39 To: Mark Walters <markwalters1009@gmail.com>\r
40 Subject: Re: [PATCH v2 0/2] cli: Allow true/false parameter for boolean\r
41 Message-ID: <20120314024716.GL2787@mit.edu>\r
42 References: <1331377533-30262-1-git-send-email-markwalters1009@gmail.com>\r
43 MIME-Version: 1.0\r
44 Content-Type: text/plain; charset=us-ascii\r
45 Content-Disposition: inline\r
46 In-Reply-To: <1331377533-30262-1-git-send-email-markwalters1009@gmail.com>\r
47 User-Agent: Mutt/1.5.21 (2010-09-15)\r
48 X-Brightmail-Tracker:\r
49  H4sIAAAAAAAAA+NgFmpkleLIzCtJLcpLzFFi42IR4hTV1t3KluBv8Pa9jMXquTwW12/OZHZg\r
50         8tg56y67x7NVt5gDmKK4bFJSczLLUov07RK4MiY17mMv+MlTcWH2V/YGxh+cXYycHBICJhL3\r
51         d/1lh7DFJC7cW8/WxcjFISSwj1Fi1vbLYAkhgQ2MEtcOC0PYJ5kk1i8phShawiixYvVkFpAE\r
52         i4CqxKV175hBbDYBDYlt+5czgtgiAjoStw8tABvELCAt8e13MxOILSzgLvFu0lywGl4BbYnz\r
53         c5YxQyzwlDjztIcFIi4ocXLmExaIXi2JG/9eAvVygM1Z/o8DJMwp4CUx9dEFsBJRARWJKSe3\r
54         sU1gFJqFpHsWku5ZCN0LGJlXMcqm5Fbp5iZm5hSnJusWJyfm5aUW6Rrr5WaW6KWmlG5iBIe0\r
55         JN8Oxq8HlQ4xCnAwKvHwCtfG+wuxJpYVV+YeYpTkYFIS5Y18CxTiS8pPqcxILM6ILyrNSS0+\r
56         xCjBwawkwvtiKlCONyWxsiq1KB8mJc3BoiTOq6b1zk9IID2xJDU7NbUgtQgmK8PBoSTBqwIy\r
57         VLAoNT21Ii0zpwQhzcTBCTKcB2h4+XeQ4cUFibnFmekQ+VOMilLivHfeACUEQBIZpXlwvbCU\r
58         84pRHOgVYd6VIFU8wHQF1/0KaDAT0OCSb3Egg0sSEVJSDYzlHz68ylLVs53/e9MZa5NEw2/R\r
59         7DO06krLJWyZPH2Y6zSXKq05vjy7PU90wuae3V7m9+6tmXpDh3V7+CnNa0q8/+e+WbrvkYDJ\r
60         ze9R1QIb723W5JX1bquofStx9XLRwk83tzAnzbgy44rV9/yYj60XXkbc4H94TUf+i/3WXE2+\r
61         m89fn/68JmC3EktxRqKhFnNRcSIANjYZ+xQDAAA=\r
62 Cc: notmuch@notmuchmail.org\r
63 X-BeenThere: notmuch@notmuchmail.org\r
64 X-Mailman-Version: 2.1.13\r
65 Precedence: list\r
66 List-Id: "Use and development of the notmuch mail system."\r
67         <notmuch.notmuchmail.org>\r
68 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
69         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
70 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
71 List-Post: <mailto:notmuch@notmuchmail.org>\r
72 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
73 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
74         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
75 X-List-Received-Date: Wed, 14 Mar 2012 02:47:18 -0000\r
76 \r
77 Quoth Mark Walters on Mar 10 at 11:05 am:\r
78 > Hi\r
79\r
80 > Here is a second version of a patch to allow parameters to boolean\r
81 > options on the command line. This version allows parameters\r
82 > (=true|false). My first version is at\r
83 > id:"1331244944-7960-1-git-send-email-markwalters1009@gmail.com". Jani\r
84 > posted an alternative version there. Jani's version and this one are\r
85 > quite similar: the key difference is that this version abuses a\r
86 > notmuch_bool_t by setting it to -1 (to indicate that the parser has\r
87 > not set this option). This makes the code simpler but is definitely an\r
88 > abuse. I will discuss this further in replies to Jani's series.\r
89\r
90 > Best wishes\r
91\r
92 > Mark\r
93\r
94 > Mark Walters (2):\r
95 >   cli: Parsing. Allow true/false parameter for boolean options.\r
96 >   cli: make --entire-thread=false work for format=json.\r
97 \r
98 LGTM.  The one question I have is whether or not the resulting\r
99 non-entire-thread behavior of the JSON format is actually what we\r
100 *want*.  As a probably unintentional consequence of the current show\r
101 code, we get\r
102 \r
103 # A message and its replies (show_messages)\r
104 thread_node = [\r
105     message?,                 # present if --entire-thread or matched\r
106     [thread_node*]            # children of message\r
107 ]\r
108 \r
109 But would it be better to have\r
110 \r
111 thread_node = [\r
112     message|null,             # non-null if --entire-thread or matched\r
113     [thread_node*]            # children of message\r
114 ]\r
115 \r
116 ?  The latter is much more natural for consumers to work with\r
117 (checking whether the message matched or not is more natural and the\r
118 index of the child list doesn't change), but would require a little\r
119 more code in show to support.\r