Re: [PATCH] emacs: wash: make word-wrap bound message width
[notmuch-archives.git] / 39 / 006db6203338ab5268bdcddce989854469da74
1 Return-Path: <jani@nikula.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 BF61C431FAF\r
6         for <notmuch@notmuchmail.org>; Sun, 11 Mar 2012 12:26:19 -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 6nUreTTVMYrA for <notmuch@notmuchmail.org>;\r
16         Sun, 11 Mar 2012 12:26:15 -0700 (PDT)\r
17 Received: from mail-lb0-f181.google.com (mail-lb0-f181.google.com\r
18         [209.85.217.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
19         (No client certificate requested)\r
20         by olra.theworths.org (Postfix) with ESMTPS id EDDE3431FAE\r
21         for <notmuch@notmuchmail.org>; Sun, 11 Mar 2012 12:26:14 -0700 (PDT)\r
22 Received: by lbok6 with SMTP id k6so1094911lbo.26\r
23         for <notmuch@notmuchmail.org>; Sun, 11 Mar 2012 12:26:12 -0700 (PDT)\r
24 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
25         d=google.com; s=20120113;\r
26         h=from:to:subject:in-reply-to:references:user-agent:date:message-id\r
27         :mime-version:content-type:x-gm-message-state;\r
28         bh=M+ezVKHFb+hK0x36S8SDYFu+W1WGDBgin6zLK2KPWmQ=;\r
29         b=Bbyl4+fYEOQLOEOzJ9W4iEYDyreDB260yVPGIe3BMao78tkvFkUv0Hck9SG13Jv7dk\r
30         YeQsWwqreP+BS31XLytyzpfhwVVtJ/EThyVH6hE4TjOMY0duJ4C5bzxDixT/GF+3COHe\r
31         CZhXqAboSx202MOwP180UZAFIyNUWd9UeKay84zbmkDPh9hfpSrHjN2LmLmjStA28an9\r
32         JREyIPSUzxJe8TyfyfXw8wUdqhC++ER+Ow8OABDeZlVYmSMtgGJW0V6WpLPyD+kaAN/e\r
33         ec/gUrdUmdoBx2oT+up7orkPBX2c3mejXxWT/jl7ueh2EOft1rnbxe5CwEzIONdnKp86\r
34         6ZZQ==\r
35 Received: by 10.152.127.9 with SMTP id nc9mr7204136lab.20.1331493971948;\r
36         Sun, 11 Mar 2012 12:26:11 -0700 (PDT)\r
37 Received: from localhost (dsl-hkibrasgw4-fe50f800-253.dhcp.inet.fi.\r
38         [84.248.80.253])\r
39         by mx.google.com with ESMTPS id nq2sm11631359lab.4.2012.03.11.12.26.09\r
40         (version=SSLv3 cipher=OTHER); Sun, 11 Mar 2012 12:26:10 -0700 (PDT)\r
41 From: Jani Nikula <jani@nikula.org>\r
42 To: Mark Walters <markwalters1009@gmail.com>, notmuch@notmuchmail.org\r
43 Subject: Re: [PATCH 0/3] argument parsing additions\r
44 In-Reply-To: <87vcmchf8c.fsf@qmul.ac.uk>\r
45 References: <87399iicit.fsf@qmul.ac.uk> <cover.1331329406.git.jani@nikula.org>\r
46         <87vcmchf8c.fsf@qmul.ac.uk>\r
47 User-Agent: Notmuch/0.11.1+295~g780f284 (http://notmuchmail.org) Emacs/23.3.1\r
48         (i686-pc-linux-gnu)\r
49 Date: Sun, 11 Mar 2012 21:26:07 +0200\r
50 Message-ID: <87ty1vym5s.fsf@nikula.org>\r
51 MIME-Version: 1.0\r
52 Content-Type: text/plain; charset=us-ascii\r
53 X-Gm-Message-State:\r
54  ALoCoQmLHvi+0/Qb2OyX8TyCRguk20Rr4jd7oUWeLzS0F2u+kPS79hJ0MXzDBGTrc7EBKC0+RNbP\r
55 X-BeenThere: notmuch@notmuchmail.org\r
56 X-Mailman-Version: 2.1.13\r
57 Precedence: list\r
58 List-Id: "Use and development of the notmuch mail system."\r
59         <notmuch.notmuchmail.org>\r
60 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
61         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
62 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
63 List-Post: <mailto:notmuch@notmuchmail.org>\r
64 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
65 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
66         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
67 X-List-Received-Date: Sun, 11 Mar 2012 19:26:19 -0000\r
68 \r
69 On Sat, 10 Mar 2012 11:23:15 +0000, Mark Walters <markwalters1009@gmail.com> wrote:\r
70 > On Sat, 10 Mar 2012 00:33:27 +0200, Jani Nikula <jani@nikula.org> wrote:\r
71 > > Hi Mark -\r
72 > > \r
73 > > I'm not sure which is worse, criticizing or rewriting other people's\r
74 > > patches. I already did the former, and now I'm doing the\r
75 > > latter. Apologies for both. I didn't really mean to write these patches,\r
76 > > but it turned out to be more fun writing a proper reply in C than in\r
77 > > English.\r
78 > > \r
79 > > Patch 1 adds --arg=true and --arg=false support for booleans. It's not\r
80 > > strictly required for the --entire-thread support in patch 3, which uses\r
81 > > the extension of keyword arguments from patch 2, but it's for\r
82 > > consistency across boolean arguments.\r
83\r
84 > Hi \r
85\r
86 > I like patch 1: I have an almost identical to my version (in the series\r
87 > I just sent to the list\r
88 > id:"1331377533-30262-1-git-send-email-markwalters1009@gmail.com>\r
89 > X-Mailer: git-send-email 1.7.9.1"). \r
90 \r
91 id:"1331377533-30262-1-git-send-email-markwalters1009@gmail.com" (fixed\r
92 reference)\r
93 \r
94 Either of the patches should be pushed forward. The command line\r
95 interface is sound, in line with notmuch style, and allows boolean\r
96 parameters defaulting to true that you can switch off. And it needs no\r
97 changes to argument parser users.\r
98 \r
99 > I am not sure about patch 2 and patch 3. Do you have a use case for\r
100 > --option except when option is a boolean?\r
101 \r
102 For the sake of example, if some command produced some unformatted\r
103 output by default, you could enable some formatting with --format and\r
104 specify details with --format=foo or --format=bar. But admittedly it's a\r
105 bit contrived.\r
106 \r
107 And using that for the bool case is also abusing it.\r
108 \r
109 > Otherwise I think I prefer either my\r
110 > approach (abusing a notmuch_bool_t) or just adding an option\r
111 > NOTMUCH_OPT_BOOLEAN_AS_INT which does boolean parsing but returns an\r
112 > int. I guess I am saying that I think allowing boolean options which can\r
113 > sometimes default to true and sometimes to false is more useful than\r
114 > allowing --option for arbitrary keywords (*).\r
115\r
116 > What do you think? \r
117 \r
118 I think we're somewhere between overengineering and bikeshedding, and we\r
119 should just fix the issue at hand with the "boolean" -1 value hack. Your\r
120 v2 series accomplishes what's needed. Let's go with it, and consider a\r
121 more general approach if another case comes up. (I actually wrote\r
122 patches to add generic support for getting info about which arguments\r
123 were set in the command line, but I think it's more trouble than its\r
124 worth.)\r
125 \r
126 \r
127 BR,\r
128 Jani.\r
129 \r
130 \r
131\r
132 > Best wishes \r
133\r
134 > Mark\r
135\r
136 > (*) Indeed, I was thinking of the former as a possibility for the\r
137 > exclude code, but I am erring towards just using keywords so I can allow\r
138 > more options as you suggested.\r
139\r
140\r
141 > > \r
142 > > Please let me know what you think.\r
143 > > \r
144 > > BR,\r
145 > > Jani.\r
146 > > \r
147 > > \r
148 > > Jani Nikula (3):\r
149 > >   command-line-arguments: allow true and false keywords for booleans\r
150 > >   command-line-arguments: support keyword arguments with default value\r
151 > >   cli: allow switching off entire thread mode in notmuch show json\r
152 > >     format\r
153 > > \r
154 > >  command-line-arguments.c |   45 +++++++++++++++++++++++++++++++++++++++------\r
155 > >  command-line-arguments.h |    1 +\r
156 > >  notmuch-show.c           |   12 ++++++++++--\r
157 > >  3 files changed, 50 insertions(+), 8 deletions(-)\r
158 > > \r
159 > > -- \r
160 > > 1.7.5.4\r
161 > > \r