database error
[notmuch-archives.git] / 99 / 9bf0499d3aa64d744aa43bb923c1fba594a4b2
1 Return-Path: <sebastian.fischmeister@uwaterloo.ca>\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 D310F431FAF\r
6         for <notmuch@notmuchmail.org>; Sun, 21 Dec 2014 07:54:30 -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: -1.686\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-1.686 tagged_above=-999 required=5\r
12         tests=[RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_SORBS_WEB=0.614]\r
13         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 3ICsR9Hbcqq1 for <notmuch@notmuchmail.org>;\r
17         Sun, 21 Dec 2014 07:54:27 -0800 (PST)\r
18 Received: from connect.uwaterloo.ca (connhub2.connect.uwaterloo.ca\r
19         [129.97.149.119]) (using TLSv1 with cipher AES128-SHA (128/128 bits))\r
20         (No client certificate requested)\r
21         by olra.theworths.org (Postfix) with ESMTPS id 4EB14431FAE\r
22         for <notmuch@notmuchmail.org>; Sun, 21 Dec 2014 07:54:27 -0800 (PST)\r
23 Received: from CONNHUB3.connect.uwaterloo.ca (129.97.149.121) by\r
24         connhub2.connect.uwaterloo.ca (129.97.149.119) with Microsoft SMTP\r
25         Server (TLS) id 14.3.195.1; Sun, 21 Dec 2014 10:54:24 -0500\r
26 Received: from uwaterloo.ca (213.162.68.60) by connhub3.connect.uwaterloo.ca\r
27         (129.97.149.121) with Microsoft SMTP Server (TLS) id 14.3.195.1;\r
28         Sun, 21 Dec 2014 10:54:22 -0500\r
29 From: Sebastian Fischmeister <sfischme@uwaterloo.ca>\r
30 To: Richard Lawrence <richard.lawrence@berkeley.edu>,\r
31  <notmuch@notmuchmail.org>\r
32 Subject: Re: email snoozing in notmuch\r
33 In-Reply-To: <87bnnbmoda.fsf@berkeley.edu>\r
34 References: <87wq60e2q5.fsf@uwaterloo.ca>\r
35         <548800d5ecc8b_551ca3e88c@TP_L520.notmuch>\r
36         <87bnnbmoda.fsf@berkeley.edu>\r
37 User-Agent: Notmuch/0.19 (http://notmuchmail.org) Emacs/24.4.1\r
38         (x86_64-unknown-linux-gnu)\r
39 X-Homepage: http://esg.uwaterloo.ca\r
40 Date: Sun, 21 Dec 2014 10:54:22 -0500\r
41 Message-ID: <87h9wpngsi.fsf@uwaterloo.ca>\r
42 MIME-Version: 1.0\r
43 Content-Type: text/plain\r
44 X-BeenThere: notmuch@notmuchmail.org\r
45 X-Mailman-Version: 2.1.13\r
46 Precedence: list\r
47 Reply-To: sfischme@uwaterloo.ca\r
48 List-Id: "Use and development of the notmuch mail system."\r
49         <notmuch.notmuchmail.org>\r
50 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
51         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
52 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
53 List-Post: <mailto:notmuch@notmuchmail.org>\r
54 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
55 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
56         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
57 X-List-Received-Date: Sun, 21 Dec 2014 15:54:31 -0000\r
58 \r
59 Hi Richard,\r
60 \r
61 Thanks for the nice and simple solution. I prefer this one to a solution\r
62 like notmuch-snooze that stores the desnoozing in an external program\r
63 and thus complicates backups.\r
64 \r
65   Sebastian\r
66 \r
67 Richard Lawrence <richard.lawrence@berkeley.edu> writes:\r
68 \r
69 > Franz Fellner <alpine.art.de@gmail.com>\r
70 > writes:\r
71 >\r
72 >> Sebastian Fischmeister wrote:\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 > I actually do something like this.  It's not everything Sebastian was\r
95 > looking for, but it's very simple, and works great for me.\r
96 >\r
97 > I use a combination of a "pending" tag and a "byYYYYMMDD" tag.\r
98 >\r
99 > From cron, I run the following to refile pending mail back to the inbox\r
100 > when it comes due:\r
101 >\r
102 > #!/bin/bash\r
103 > DATE_STR=$(date +'%Y%m%d')\r
104 > notmuch tag +inbox -pending -by$DATE_STR -- tag:by$DATE_STR\r
105 >\r
106 > and in Emacs, I use the following key binding to snooze mail (or in the Mutt\r
107 > terminology I borrowed, `postpone' it, hence the key):\r
108 >\r
109 > (define-key notmuch-search-mode-map "P"\r
110 >   (lambda ()\r
111 >     "postpone message (remove inbox tag, add pending tag and refile date)"\r
112 >     (interactive)\r
113 >     (let* ((date-string (format-time-string "%Y%m%d" (org-read-date nil t)))\r
114 >          (date-tag (concat "+by" date-string)))\r
115 >       (notmuch-search-tag `("-inbox" "+pending" ,date-tag)))))\r
116 >       \r
117 > (The `org-read-date' function gives me a nice easy way to pick a date\r
118 > from a calendar.  I bind "P" to the same function in\r
119 > notmuch-show-mode-map, too.)\r
120 >\r
121 > Hope that helps!\r
122 >\r
123 > Best,\r
124 > Richard\r
125 >\r
126 > _______________________________________________\r
127 > notmuch mailing list\r
128 > notmuch@notmuchmail.org\r
129 > http://notmuchmail.org/mailman/listinfo/notmuch\r