Re: [PATCH v4 01/16] add util/search-path.{c, h} to test for executables in $PATH
[notmuch-archives.git] / 1b / ab379a8aef94e38fb242c498df9b56da9c1e60
1 Return-Path: <sojkam1@fel.cvut.cz>\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 EF6A1431FB6\r
6         for <notmuch@notmuchmail.org>; Thu, 25 Sep 2014 13:49:15 -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: -2.3\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-2.3 tagged_above=-999 required=5\r
12         tests=[RCVD_IN_DNSWL_MED=-2.3] 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 DAfOQHHqJzX9 for <notmuch@notmuchmail.org>;\r
16         Thu, 25 Sep 2014 13:49:10 -0700 (PDT)\r
17 Received: from max.feld.cvut.cz (max.feld.cvut.cz [147.32.192.36])\r
18         by olra.theworths.org (Postfix) with ESMTP id C1785431FAF\r
19         for <notmuch@notmuchmail.org>; Thu, 25 Sep 2014 13:49:09 -0700 (PDT)\r
20 Received: from localhost (unknown [192.168.200.7])\r
21         by max.feld.cvut.cz (Postfix) with ESMTP id 742863CFEB1;\r
22         Thu, 25 Sep 2014 22:49:02 +0200 (CEST)\r
23 X-Virus-Scanned: IMAP STYX AMAVIS\r
24 Received: from max.feld.cvut.cz ([192.168.200.1])\r
25         by localhost (styx.feld.cvut.cz [192.168.200.7]) (amavisd-new,\r
26         port 10044)\r
27         with ESMTP id cu5E41uJeuaM; Thu, 25 Sep 2014 22:48:58 +0200 (CEST)\r
28 Received: from imap.feld.cvut.cz (imap.feld.cvut.cz [147.32.192.34])\r
29         by max.feld.cvut.cz (Postfix) with ESMTP id 96C533CFEA8;\r
30         Thu, 25 Sep 2014 22:48:58 +0200 (CEST)\r
31 Received: from wsh by steelpick.2x.cz with local (Exim 4.84)\r
32         (envelope-from <sojkam1@fel.cvut.cz>)\r
33         id 1XXFy9-0002Z6-2R; Thu, 25 Sep 2014 22:48:53 +0200\r
34 From: Michal Sojka <sojkam1@fel.cvut.cz>\r
35 To: Tomi Ollila <tomi.ollila@iki.fi>, notmuch@notmuchmail.org\r
36 Subject: Re: [PATCH 1/5] cli: Refactor option passing in the search command\r
37 In-Reply-To: <m27g0rpl6x.fsf@guru.guru-group.fi>\r
38 References: <1411378679-7307-1-git-send-email-sojkam1@fel.cvut.cz>\r
39         <1411378679-7307-2-git-send-email-sojkam1@fel.cvut.cz>\r
40         <m27g0rpl6x.fsf@guru.guru-group.fi>\r
41 User-Agent: Notmuch/0.18.1+101~g56b0ff0 (http://notmuchmail.org) Emacs/24.3.1\r
42         (x86_64-pc-linux-gnu)\r
43 Date: Thu, 25 Sep 2014 22:48:53 +0200\r
44 Message-ID: <87k34rtoi2.fsf@steelpick.2x.cz>\r
45 MIME-Version: 1.0\r
46 Content-Type: text/plain\r
47 X-BeenThere: notmuch@notmuchmail.org\r
48 X-Mailman-Version: 2.1.13\r
49 Precedence: list\r
50 List-Id: "Use and development of the notmuch mail system."\r
51         <notmuch.notmuchmail.org>\r
52 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
53         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
54 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
55 List-Post: <mailto:notmuch@notmuchmail.org>\r
56 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
57 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
58         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
59 X-List-Received-Date: Thu, 25 Sep 2014 20:49:16 -0000\r
60 \r
61 On Thu, Sep 25 2014, Tomi Ollila wrote:\r
62 > On Mon, Sep 22 2014, Michal Sojka <sojkam1@fel.cvut.cz> wrote:\r
63 >\r
64 >> Many functions that implement the search command need to access command\r
65 >> line options. Instead of passing each option in a separate variable, put\r
66 >> them in a structure and pass only this structure.\r
67 >\r
68 > This patch looks good to me.\r
69 \r
70 Thanks for the review.\r
71 \r
72 > Although the test and the implementation in the next patches look OK, I'd\r
73 > prefer the FLAG implementation Jani suggested earlier. IMO now that I\r
74 > compare these two it looks cleaner and simpler...\r
75 \r
76 The question is which kind of simplicity you have in mind. I think that\r
77 my version is simpler to type (less keystrokes). But if others have\r
78 different opinion, I don't mind.\r
79 \r
80 > I.e. I'd prefer notmuch search --output=sender --output=recipients ...\r
81 > (same output regardless the order these options given).\r
82 \r
83 This should be the case with both implementations.\r
84 \r
85 > I'd postpone the unique handling to a bit later phase; there are quite a\r
86 > few options how to do that (*)\r
87 >\r
88 >\r
89 > Tomi\r
90 >\r
91 > (*) IMO the default unique (when requested) would be exact case-sensitive\r
92 > match of full name & address \r
93 \r
94 Why do you think that case-sensitive address matching should be the\r
95 default? In theory local-part can be case sensitive, but I've never seen\r
96 that in reality. So this default would only be useful if you want to\r
97 research how people type your email address :)\r
98 \r
99 > parts (phrase, address & comment); \r
100 \r
101 What do you mean by phrase and comment? Address syntax is defined by\r
102 http://tools.ietf.org/html/rfc5322#section-3.4.1.\r
103 \r
104 > then (a subset of possible) options could be:\r
105 >    +) case-insensitive (first match taken (or last match?) -- option?)\r
106 >    +) unique email addresses (take phrase/comment from first/last?)\r
107 >       --  or use first that has something additional to plain address\r
108 >       --  or use last  that has something additional to plain address\r
109 \r
110 Yes, there is a lot of possible options. I don't think that notmuch has\r
111 to support all of them. If people need something special like "use last\r
112 that has something additional to plain address", they can always do\r
113 --unique=none and do their own post-processing.\r
114 \r
115 -Michal\r