Re: [PATCH v4 13/16] add indexopts to notmuch python bindings.
[notmuch-archives.git] / 97 / a52ec5a3ec1e2cf9c7003c420856c79bd18c9f
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 20A5A429E57\r
6         for <notmuch@notmuchmail.org>; Sun, 29 Jan 2012 15:17:40 -0800 (PST)\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 2NQoA4TsjYbB for <notmuch@notmuchmail.org>;\r
16         Sun, 29 Jan 2012 15:17:39 -0800 (PST)\r
17 Received: from dmz-mailsec-scanner-7.mit.edu (DMZ-MAILSEC-SCANNER-7.MIT.EDU\r
18         [18.7.68.36])\r
19         by olra.theworths.org (Postfix) with ESMTP id 8D441431E64\r
20         for <notmuch@notmuchmail.org>; Sun, 29 Jan 2012 15:17:39 -0800 (PST)\r
21 X-AuditID: 12074424-b7fae6d000000906-8c-4f25d3932734\r
22 Received: from mailhub-auth-4.mit.edu ( [18.7.62.39])\r
23         by dmz-mailsec-scanner-7.mit.edu (Symantec Messaging Gateway) with SMTP\r
24         id 83.31.02310.393D52F4; Sun, 29 Jan 2012 18:17:39 -0500 (EST)\r
25 Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103])\r
26         by mailhub-auth-4.mit.edu (8.13.8/8.9.2) with ESMTP id q0TNHduT020974; \r
27         Sun, 29 Jan 2012 18:17:39 -0500\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 q0TNHb39025410\r
32         (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);\r
33         Sun, 29 Jan 2012 18:17:38 -0500 (EST)\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 1RrdzO-00009M-1l; Sun, 29 Jan 2012 18:16:50 -0500\r
37 Date: Sun, 29 Jan 2012 18:16:50 -0500\r
38 From: Austin Clements <amdragon@MIT.EDU>\r
39 To: Dmitry Kurochkin <dmitry.kurochkin@gmail.com>\r
40 Subject: Re: [PATCH 1/6] emacs: move tag format validation to `notmuch-tag'\r
41         function\r
42 Message-ID: <20120129231650.GK17991@mit.edu>\r
43 References: <1327725684-5887-1-git-send-email-dmitry.kurochkin@gmail.com>\r
44         <20120129213427.GF17991@mit.edu> <87fwey86hj.fsf@gmail.com>\r
45 MIME-Version: 1.0\r
46 Content-Type: text/plain; charset=us-ascii\r
47 Content-Disposition: inline\r
48 In-Reply-To: <87fwey86hj.fsf@gmail.com>\r
49 User-Agent: Mutt/1.5.21 (2010-09-15)\r
50 X-Brightmail-Tracker:\r
51  H4sIAAAAAAAAA+NgFmplleLIzCtJLcpLzFFi42IRYrdT1518WdXfYMdVbourW/vZLa7fnMns\r
52         wOSxc9Zddo9nq24xBzBFcdmkpOZklqUW6dslcGXM3vCEteCqQMWJc++ZGxg7ebsYOTkkBEwk\r
53         /i9fygZhi0lcuLceyObiEBLYxyjxc8IpdghnA6PEn4OXWSCck0wSc7YvhHKWMEpMuXSbCaSf\r
54         RUBVYvqEfjCbTUBDYtv+5YwgtoiAocSti6+YQWxmAWmJb7+bwWqEBcIkurafA9vNK6AjMW37\r
55         HlaIoZ2MEq9+PmWGSAhKnJz5hAWiWUvixr+XQM0cYIOW/+MACXMKqEtcv90HVi4qoCIx5eQ2\r
56         tgmMQrOQdM9C0j0LoXsBI/MqRtmU3Crd3MTMnOLUZN3i5MS8vNQiXXO93MwSvdSU0k2M4NB2\r
57         UdnB2HxI6RCjAAejEg+vwgoVfyHWxLLiytxDjJIcTEqivIEXVP2F+JLyUyozEosz4otKc1KL\r
58         DzFKcDArifDOWQaU401JrKxKLcqHSUlzsCiJ82povfMTEkhPLEnNTk0tSC2CycpwcChJ8D65\r
59         BNQoWJSanlqRlplTgpBm4uAEGc4DNPwvSA1vcUFibnFmOkT+FKOilDgvIzB5CAmAJDJK8+B6\r
60         YannFaM40CvCvKwgVTzAtAXX/QpoMBPQ4OcMYINLEhFSUg2MLuK/eoxq1vRGOMQeEZntW1Xo\r
61         tHqVv/8xp0t/rNQcX68wYvy/oic7myvVZV/S8Xx7y8j8n1PvPIoW237e4XqTIFOFlH3VqhcW\r
62         rhHVb27H+LTPCVfkzWMKEy6tnrV6UVXblrVnnnrl58TOtvtnWvzytTfjygXs0aXdC61/VTJr\r
63         76/Sv3XzxiIlluKMREMt5qLiRABleTXIGAMAAA==\r
64 Cc: notmuch@notmuchmail.org\r
65 X-BeenThere: notmuch@notmuchmail.org\r
66 X-Mailman-Version: 2.1.13\r
67 Precedence: list\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, 29 Jan 2012 23:17:40 -0000\r
78 \r
79 Quoth Dmitry Kurochkin on Jan 30 at  2:54 am:\r
80 > Hi Austin.\r
81\r
82 > On Sun, 29 Jan 2012 16:34:27 -0500, Austin Clements <amdragon@MIT.EDU> wrote:\r
83 > > One philosophical nit below, but not enough to hold this up.\r
84 > > \r
85 > > Quoth Dmitry Kurochkin on Jan 28 at  8:41 am:\r
86 > > > Before the change, tag format validation was done in\r
87 > > > `notmuch-search-operate-all' function only.  The patch moves it down\r
88 > > > to `notmuch-tag', so that all users of that function get input\r
89 > > > validation.\r
90 > > > ---\r
91 > > >  emacs/notmuch.el |   12 ++++++------\r
92 > > >  1 files changed, 6 insertions(+), 6 deletions(-)\r
93 > > > \r
94 > > > diff --git a/emacs/notmuch.el b/emacs/notmuch.el\r
95 > > > index 72f78ed..84d7d0a 100644\r
96 > > > --- a/emacs/notmuch.el\r
97 > > > +++ b/emacs/notmuch.el\r
98 > > > @@ -522,6 +522,12 @@ Note: Other code should always use this function alter tags of\r
99 > > >  messages instead of running (notmuch-call-notmuch-process \"tag\" ..)\r
100 > > >  directly, so that hooks specified in notmuch-before-tag-hook and\r
101 > > >  notmuch-after-tag-hook will be run."\r
102 > > > +  ;; Perform some validation\r
103 > > > +  (when (null tags) (error "No tags given"))\r
104 > > \r
105 > > Since this is a non-interactive function and hence is meant to be\r
106 > > invoked programmatically, I would expect it to accept zero tags.\r
107 > > Unlike the following check, this is a UI-level check and thus, I\r
108 > > believe, belongs in interactive functions (even if that requires a\r
109 > > little duplication).\r
110 > > \r
111\r
112 > Agreed.  Though I would hate to add the same check to each tag\r
113 > operation.  Perhaps this check can go to\r
114 > `notmuch-select-tags-with-completion'?\r
115\r
116 > This is not the main patch in the series.  So I think I would prefer not\r
117 > to make v2 because of this issue.  If we come up with a good (i.e. no\r
118 > duplication) solution, I will prepare a separate patch for it.\r
119 \r
120 What about not giving any error for no tags?  As a user, if I delete\r
121 the whole tags prompt including the +/- operator, that's a very\r
122 explicit action and it's very clear what it should do (nothing).  I\r
123 don't need Emacs wagging its finger at me for doing something with a\r
124 clear meaning.\r