Re: [PATCH 9/9] add has: query prefix to search for specific properties
[notmuch-archives.git] / 79 / 87b833c5f0625afba619292a2d4cff45980dc1
1 Return-Path: <tomi.ollila@iki.fi>\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 C69E5431FAF\r
6         for <notmuch@notmuchmail.org>; Mon, 17 Sep 2012 08:35:54 -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\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
12         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 UQwwJEmq8oQX for <notmuch@notmuchmail.org>;\r
16         Mon, 17 Sep 2012 08:35:54 -0700 (PDT)\r
17 Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34])\r
18         by olra.theworths.org (Postfix) with ESMTP id EC6D3431FAE\r
19         for <notmuch@notmuchmail.org>; Mon, 17 Sep 2012 08:35:53 -0700 (PDT)\r
20 Received: from guru.guru-group.fi (localhost [IPv6:::1])\r
21         by guru.guru-group.fi (Postfix) with ESMTP id 191CF10014F;\r
22         Mon, 17 Sep 2012 18:35:59 +0300 (EEST)\r
23 From: Tomi Ollila <tomi.ollila@iki.fi>\r
24 To: Michal Nazarewicz <mina86@mina86.com>, David Bremner <david@tethera.net>,\r
25         Jani Nikula <jani@nikula.org>, notmuch@notmuchmail.org\r
26 Subject: Re: [PATCH v3 6/9] lib: add date range query support\r
27 In-Reply-To: <xa1tipbczo68.fsf@mina86.com>\r
28 References: <cover.1347484177.git.jani@nikula.org>\r
29         <532340d05ea748518c021048900bb83149e04e88.1347484177.git.jani@nikula.org>\r
30         <xa1tsjamdvj6.fsf@mina86.com> <878vce5cip.fsf@zancas.localnet>\r
31         <xa1tipbczo68.fsf@mina86.com>\r
32 User-Agent: Notmuch/0.13.2+171~g2d1a988 (http://notmuchmail.org) Emacs/24.2.1\r
33         (x86_64-unknown-linux-gnu)\r
34 X-Face: HhBM'cA~<r"^Xv\KRN0P{vn'Y"Kd;zg_y3S[4)KSN~s?O\"QPoL\r
35         $[Xv_BD:i/F$WiEWax}R(MPS`^UaptOGD`*/=@\1lKoVa9tnrg0TW?"r7aRtgk[F\r
36         !)g;OY^,BjTbr)Np:%c_o'jj,Z\r
37 Date: Mon, 17 Sep 2012 18:35:58 +0300\r
38 Message-ID: <m21ui01x29.fsf@guru.guru-group.fi>\r
39 MIME-Version: 1.0\r
40 Content-Type: text/plain; charset=utf-8\r
41 Content-Transfer-Encoding: quoted-printable\r
42 X-BeenThere: notmuch@notmuchmail.org\r
43 X-Mailman-Version: 2.1.13\r
44 Precedence: list\r
45 List-Id: "Use and development of the notmuch mail system."\r
46         <notmuch.notmuchmail.org>\r
47 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
48         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
49 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
50 List-Post: <mailto:notmuch@notmuchmail.org>\r
51 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
52 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
53         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
54 X-List-Received-Date: Mon, 17 Sep 2012 15:35:55 -0000\r
55 \r
56 On Mon, Sep 17 2012, Michal Nazarewicz wrote:\r
57 \r
58 >> Michal Nazarewicz <mina86@mina86.com> writes:\r
59 >>> IMO this is totally unintuitive and not how the range should work.\r
60 >>> date:foo..bar should return messages whose date >=3D foo and < bar.  So\r
61 >>> for instance date:november..yesterday should return messages whose date\r
62 >>> is > 2012/11/01 00:00:00 and < 2012/09/12 00:00:00.  So to get\r
63 >>> yesterdays messages one would do: date:yesterday..today.\r
64 >\r
65 > On Thu, Sep 13 2012, David Bremner wrote:\r
66 >> I don't find ranges being half-open by default to be very\r
67 >> intuitive. Perhaps I don't program in python enough.\r
68 >\r
69 > Perhaps C than: =E2=80=9Cfor (i =3D 0; i < 10; ++i)=E2=80=9D is the stand=\r
70 ard idiom and the\r
71 > end range is open.\r
72 >\r
73 > Let's take a look at:\r
74 >\r
75 >       date:2012/01/01..2012/01/01 + 1 day\r
76 >\r
77 > in my opinion, that should give results from the first of January only,\r
78 > since =E2=80=9C+ 1 day=E2=80=9D indicates in a way how long user want the=\r
79  period to be.\r
80 >\r
81 > I think it's also easier to pragmatically create ranges.  For instance,\r
82 > let's say you want to create ranges for each week, you'd end up with:\r
83 >\r
84 >       date:2012/01/02..2012/01/09     ## 2012w01\r
85 >       date:2012/01/09..2012/01/16     ## 2012w02\r
86 >       date:2012/01/16..2012/01/23     ## 2012w03\r
87 \r
88 Ok, these matches with ISO Week...\r
89 \r
90 > Notice how the opening date of a range matches the closing date of\r
91 > the previous date.\r
92 \r
93         2012/01/02 is monday\r
94         2012/01/09 is monday.\r
95 \r
96 For me=20\r
97         date:2012/01/02..2012/01/08     ## 2012w01\r
98 \r
99 would be more intuitive in this context.\r
100 \r
101 \r
102 for (i =3D 0; i < 10; ++i)  loops through 0 - 9.\r
103 \r
104 for (i =3D 1; i <=3D 10; ++i)  loops through 1 - 10.\r
105 \r
106 python -c 'for f in range(5): print f'  prints 0 - 4\r
107 \r
108 perl -le 'for (1..5) { print $_ }'  prints 1 - 5\r
109 \r
110 \r
111 ... these does not clarify, but confuses these intuitions :D\r
112 \r
113 >\r
114 > --=20\r
115 > Best regards,                                         _     _\r
116 \r
117 > ..o | Computer Science,  Micha=C5=82 =E2=80=9Cmina86=E2=80=9D Nazarewicz =\r
118    (o o)\r
119 \r
120 Tomi\r