Re: [PATCH] emacs: wash: make word-wrap bound message width
[notmuch-archives.git] / 40 / 601210abc1f1630b9b3de3594645492e5c53d2
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 36CD4431FAF\r
6         for <notmuch@notmuchmail.org>; Thu, 13 Sep 2012 06:33:30 -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 Hgf-cwZCkxKQ for <notmuch@notmuchmail.org>;\r
16         Thu, 13 Sep 2012 06:33:29 -0700 (PDT)\r
17 Received: from mail-qc0-f181.google.com (mail-qc0-f181.google.com\r
18         [209.85.216.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 726BD431FAE\r
21         for <notmuch@notmuchmail.org>; Thu, 13 Sep 2012 06:33:29 -0700 (PDT)\r
22 Received: by qcpx40 with SMTP id x40so2227693qcp.26\r
23         for <notmuch@notmuchmail.org>; Thu, 13 Sep 2012 06:33:26 -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=2RbYP5a1EjoMxdHLUT4oQhORDduM+poqTyi2LUM/tU4=;\r
29         b=GUUbSX624zM/GTKCAlCWz5xofLzcZikG5eYyZsindt6QYf8NLwo/ue1na+XmThavMg\r
30         1nBEUQ/4+SEmizQvSab4STL8WaLg1+ub9AIl1zHkUigYUKPvsNk6wdBFldUMmDLN8uzS\r
31         lEvgmV8EXPjgVmim4Z26Ni+m7QUH+db6mrj0dRvXW+ndbqMfDbS7BZaZPp+whgBO1po5\r
32         TDYFr7tsVQ/dfIaD4pzXAo81q2DVnVF1bVl9gB4raLA94896XPz2RavmnjY1uyYbDmqV\r
33         W7LeDeqXov+omzJtFVQSu2m6dWkpcEbToOL0iY36usiuGmml38uUxTSb32RICyI4zOdc\r
34         i8gA==\r
35 Received: by 10.224.70.141 with SMTP id d13mr5464101qaj.99.1347543206662;\r
36         Thu, 13 Sep 2012 06:33:26 -0700 (PDT)\r
37 Received: from localhost ([2001:4b98:dc0:43:216:3eff:fe1b:25f3])\r
38         by mx.google.com with ESMTPS id\r
39         dg10sm14046837qab.12.2012.09.13.06.33.21\r
40         (version=SSLv3 cipher=OTHER); Thu, 13 Sep 2012 06:33:25 -0700 (PDT)\r
41 From: Jani Nikula <jani@nikula.org>\r
42 To: Tomi Ollila <tomi.ollila@iki.fi>, Michal Nazarewicz <mina86@mina86.com>,\r
43         notmuch@notmuchmail.org, David Bremner <david@tethera.net>\r
44 Subject: Re: [PATCH v3 6/9] lib: add date range query support\r
45 In-Reply-To: <m2r4q6jgz5.fsf@guru.guru-group.fi>\r
46 References: <cover.1347484177.git.jani@nikula.org>\r
47         <532340d05ea748518c021048900bb83149e04e88.1347484177.git.jani@nikula.org>\r
48         <xa1tsjamdvj6.fsf@mina86.com> <m2r4q6jgz5.fsf@guru.guru-group.fi>\r
49 User-Agent: Notmuch/0.14+43~gd23e654 (http://notmuchmail.org) Emacs/23.2.1\r
50         (x86_64-pc-linux-gnu)\r
51 Date: Thu, 13 Sep 2012 15:33:12 +0200\r
52 Message-ID: <874nn2rqsn.fsf@nikula.org>\r
53 MIME-Version: 1.0\r
54 Content-Type: text/plain; charset=us-ascii\r
55 X-Gm-Message-State:\r
56  ALoCoQnVZ5+FC71tp3Pp4CFMccijjbz8nMfBOR5xm4sD9fDh8qTR0bX4xpJMqp9Gfqtig2eWpjvS\r
57 X-BeenThere: notmuch@notmuchmail.org\r
58 X-Mailman-Version: 2.1.13\r
59 Precedence: list\r
60 List-Id: "Use and development of the notmuch mail system."\r
61         <notmuch.notmuchmail.org>\r
62 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
63         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
64 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
65 List-Post: <mailto:notmuch@notmuchmail.org>\r
66 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
67 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
68         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
69 X-List-Received-Date: Thu, 13 Sep 2012 13:33:30 -0000\r
70 \r
71 On Thu, 13 Sep 2012, Tomi Ollila <tomi.ollila@iki.fi> wrote:\r
72 > On Thu, Sep 13 2012, Michal Nazarewicz <mina86@mina86.com> wrote:\r
73 >\r
74 >> On Wed, Sep 12 2012, Jani Nikula wrote:\r
75 >>> Add a custom value range processor to enable date and time searches of\r
76 >>> the form date:since..until, where "since" and "until" are expressions\r
77 >>> understood by the previously added date/time parser, to restrict the\r
78 >>> results to messages within a particular time range (based on the Date:\r
79 >>> header).\r
80 >>>\r
81 >>> If "since" or "until" describes date/time at an accuracy of days or\r
82 >>> less, the values are rounded according to the accuracy, towards past\r
83 >>> for "since" and towards future for "until". For example,\r
84 >>> date:november..yesterday would match from the beginning of November\r
85 >>> until the end of yesterday. Expressions such as date:today..today\r
86 >>> means since the beginning of today until the end of today.\r
87 >>\r
88 >> IMO this is totally unintuitive and not how the range should work.\r
89 >> date:foo..bar should return messages whose date >= foo and < bar.  So\r
90 >> for instance date:november..yesterday should return messages whose date\r
91 >> is > 2012/11/01 00:00:00 and < 2012/09/12 00:00:00.  So to get\r
92 >> yesterdays messages one would do: date:yesterday..today.\r
93 >\r
94 >\r
95 > I find yesterday..yesterday to return whole yesterday's messages more\r
96 > intuitive than that returning zero messages and requiring yesterday..today\r
97 > to see messages sent yesterday. However, I've noticed that range\r
98 > described as -1day..-1day (if that syntax is/were supported)\r
99 > that would be a bit confusing (In yesterday's case I think the length\r
100 > of 'yesterday' is 24h, but in '-1day' the lenght is one second\r
101 > (or something))\r
102 \r
103 "yesterday" equals "1 day", so you can use date:yesterday..yesterday and\r
104 date:1d..1d interchangeably.\r
105 \r
106 > Anyway, this just emphasizes that this is confusing matter; we need\r
107 > a good idiom to comprehend this issue...\r
108 \r
109 I find "since" rounding towards past and "until" rounding towards future\r
110 a very simple rule. But YMMV.\r
111 \r
112 One technical aspect is preparing for handling date:expr *without*\r
113 range, for example date:yesterday, in the future (this is currently not\r
114 supported by xapian). Intuitively that should mean all messages received\r
115 yesterday. Because the date parser does not see the range (or lack of\r
116 it) at all (and this is very much by design), the glue layer in notmuch\r
117 lib between the parser and xapian should handle it gracefully, with no\r
118 understanding of expr itself. The obvious and simple way to handle that\r
119 is to just duplicate expr on both sides of the range, and date:yesterday\r
120 would equal date:yesterday..yesterday, in a way that is very simple to\r
121 implement and explain to users.\r
122 \r
123 \r
124 BR,\r
125 Jani.\r