[PATCH v3 4/7] Add internal functions to search for alternate doc types
[notmuch-archives.git] / aa / 6363a49572a4a8bffb881f65dd1c5942d90c72
1 Return-Path: <alpine.art.de@gmail.com>\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 17270431FDA\r
6         for <notmuch@notmuchmail.org>; Wed, 10 Dec 2014 00:13:58 -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.799\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5\r
12         tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
13         FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
14 Received: from olra.theworths.org ([127.0.0.1])\r
15         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
16         with ESMTP id t+WFJlPdUHbf for <notmuch@notmuchmail.org>;\r
17         Wed, 10 Dec 2014 00:13:53 -0800 (PST)\r
18 Received: from mail-wg0-f49.google.com (mail-wg0-f49.google.com\r
19  [74.125.82.49])        (using TLSv1 with cipher RC4-SHA (128/128 bits))        (No client\r
20  certificate requested) by olra.theworths.org (Postfix) with ESMTPS id\r
21  9D1DA431FC3    for <notmuch@notmuchmail.org>; Wed, 10 Dec 2014 00:13:53 -0800\r
22  (PST)\r
23 Received: by mail-wg0-f49.google.com with SMTP id n12so2885914wgh.8\r
24         for <notmuch@notmuchmail.org>; Wed, 10 Dec 2014 00:13:52 -0800 (PST)\r
25 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;\r
26         h=date:from:to:cc:message-id:in-reply-to:references:subject\r
27         :mime-version:content-type:content-transfer-encoding:attach;\r
28         bh=Ynvi6iuJSgazzoPCaoOOITFLbewfs+nT6XD8GFzMYT4=;\r
29         b=WaGDuotOe0HrHW0BqmoJ17vNVe8Yhog3I2v3WOa6UfOWCijbAHMj2I+ZDEj+nGXyyn\r
30         IGLP4xAzicIZ3y34gQJk/cH6gkDLJQrsUFcD3JW4cYboWIqwphm/fvftQnBE4xQmNi9N\r
31         MVG/LYazJuUCccJqQQH696apA+2O9c+RP+uSLUVHoOj5vF+jxNuTxnHg/BjOUojc1NLm\r
32         eT4HmvPnT/oSa7DRg4i4Oo0IxDTOqGFUq/jjwE/G/g6nuEh8ch5saeoMEmcFn9LtdTY6\r
33         8WjR6TVYZ3hHosP78z42qWJw6/iFir9dTi4chsUBO2hFkBMC6oHAd+fi3LszmEQWXTiV\r
34         xeMw==\r
35 X-Received: by 10.180.72.199 with SMTP id f7mr4105176wiv.53.1418199232392;\r
36         Wed, 10 Dec 2014 00:13:52 -0800 (PST)\r
37 Received: from localhost (p4FFB8E50.dip0.t-ipconnect.de. [79.251.142.80])\r
38         by mx.google.com with ESMTPSA id dg7sm5297762wib.24.2014.12.10.00.13.50\r
39         for <multiple recipients>\r
40         (version=TLSv1.2 cipher=RC4-SHA bits=128/128);\r
41         Wed, 10 Dec 2014 00:13:51 -0800 (PST)\r
42 Date: Wed, 10 Dec 2014 09:14:14 +0100\r
43 From: Franz Fellner <alpine.art.de@gmail.com>\r
44 To: Sebastian Fischmeister <sfischme@uwaterloo.ca>\r
45 Message-ID: <548800d5ecc8b_551ca3e88c@TP_L520.notmuch>\r
46 In-Reply-To: <87wq60e2q5.fsf@uwaterloo.ca>\r
47 References: <87wq60e2q5.fsf@uwaterloo.ca>\r
48 Subject: RE: email snoozing in notmuch\r
49 Mime-Version: 1.0\r
50 Content-Type: text/plain;\r
51  charset=utf-8\r
52 Content-Transfer-Encoding: 7bit\r
53 Attach: \r
54 Cc: notmuch@notmuchmail.org\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: Wed, 10 Dec 2014 08:13:58 -0000\r
68 \r
69 Hi,\r
70 \r
71 Sebastian Fischmeister wrote:\r
72 > Hi,\r
73\r
74 > I'm thinking of how to realize the mail snoozing feature with notmuch,\r
75 > so that certain emails won't become visible (in the search) until a\r
76 > certain day/time (e.g., 10 days from now).\r
77\r
78 > Using the tag as an absolute date when the mail should become visible\r
79 > again, tags should be searchable and interpretable as dates. The search\r
80 > would then be something like: notmuch search tag-as-date < now and\r
81 > tag:inbox\r
82 \r
83 It is not neccessary to make notmuch interpret tags as date - just interpret them yourself ;)\r
84 You can easily run your own scripts and modify tags/mails. So a simple solution might be:\r
85 * Add "snoozed" to your notmuch exclude_tags (see config file)\r
86 * To snooze a mail run in your mail client "tag +snoozed +snoozeby-10-days"\r
87   or "tag +snoozed +snoozeuntil-2015-01-09"\r
88 * Your script (e.g. run as cronjob or after notmuch new) now \r
89   - queries for "tag:snoozed"\r
90   - looks for snoozeuntil-* tag and parses the tag into a date. If date < now remove snooze-tags.\r
91   - looks for (relative) snoozeby tag and transform it into (absolute) snoozeuntil tag.\r
92 (should be not too hard using e.g. the python or ruby bindings)\r
93 \r
94 Of course you can use an own email header to store the snoozeuntil value.\r
95 With such a header it should be possible to use afew [1] for automated snooze-tag-management\r
96 instead of a hand-crafted script.\r
97 \r
98 Regards\r
99 Franz\r
100 \r
101 [1] https://github.com/teythoon/afew\r
102 \r
103\r
104 > Using the receive date as base and encoding the delay as relative time\r
105 > from that, would still need the ability to interpret tag values as\r
106 > numbers:\r
107\r
108 > notmuch search date:01012011..15days and tag-as-number < 10 and tag:inbox\r
109\r
110 > Any ideas how the snoozing feature can be implemented with what is\r
111 > already present in notmuch?\r
112\r
113 > Thanks,\r
114 >   Sebastian\r
115 > _______________________________________________\r
116 > notmuch mailing list\r
117 > notmuch@notmuchmail.org\r
118 > http://notmuchmail.org/mailman/listinfo/notmuch\r
119 \r
120 \r