--- /dev/null
+Return-Path: <sebastian.fischmeister@uwaterloo.ca>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by olra.theworths.org (Postfix) with ESMTP id D310F431FAF\r
+ for <notmuch@notmuchmail.org>; Sun, 21 Dec 2014 07:54:30 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -1.686\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-1.686 tagged_above=-999 required=5\r
+ tests=[RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_SORBS_WEB=0.614]\r
+ autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+ by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id 3ICsR9Hbcqq1 for <notmuch@notmuchmail.org>;\r
+ Sun, 21 Dec 2014 07:54:27 -0800 (PST)\r
+Received: from connect.uwaterloo.ca (connhub2.connect.uwaterloo.ca\r
+ [129.97.149.119]) (using TLSv1 with cipher AES128-SHA (128/128 bits))\r
+ (No client certificate requested)\r
+ by olra.theworths.org (Postfix) with ESMTPS id 4EB14431FAE\r
+ for <notmuch@notmuchmail.org>; Sun, 21 Dec 2014 07:54:27 -0800 (PST)\r
+Received: from CONNHUB3.connect.uwaterloo.ca (129.97.149.121) by\r
+ connhub2.connect.uwaterloo.ca (129.97.149.119) with Microsoft SMTP\r
+ Server (TLS) id 14.3.195.1; Sun, 21 Dec 2014 10:54:24 -0500\r
+Received: from uwaterloo.ca (213.162.68.60) by connhub3.connect.uwaterloo.ca\r
+ (129.97.149.121) with Microsoft SMTP Server (TLS) id 14.3.195.1;\r
+ Sun, 21 Dec 2014 10:54:22 -0500\r
+From: Sebastian Fischmeister <sfischme@uwaterloo.ca>\r
+To: Richard Lawrence <richard.lawrence@berkeley.edu>,\r
+ <notmuch@notmuchmail.org>\r
+Subject: Re: email snoozing in notmuch\r
+In-Reply-To: <87bnnbmoda.fsf@berkeley.edu>\r
+References: <87wq60e2q5.fsf@uwaterloo.ca>\r
+ <548800d5ecc8b_551ca3e88c@TP_L520.notmuch>\r
+ <87bnnbmoda.fsf@berkeley.edu>\r
+User-Agent: Notmuch/0.19 (http://notmuchmail.org) Emacs/24.4.1\r
+ (x86_64-unknown-linux-gnu)\r
+X-Homepage: http://esg.uwaterloo.ca\r
+Date: Sun, 21 Dec 2014 10:54:22 -0500\r
+Message-ID: <87h9wpngsi.fsf@uwaterloo.ca>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+Reply-To: sfischme@uwaterloo.ca\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Sun, 21 Dec 2014 15:54:31 -0000\r
+\r
+Hi Richard,\r
+\r
+Thanks for the nice and simple solution. I prefer this one to a solution\r
+like notmuch-snooze that stores the desnoozing in an external program\r
+and thus complicates backups.\r
+\r
+ Sebastian\r
+\r
+Richard Lawrence <richard.lawrence@berkeley.edu> writes:\r
+\r
+> Franz Fellner <alpine.art.de@gmail.com>\r
+> writes:\r
+>\r
+>> Sebastian Fischmeister wrote:\r
+> \r
+>>> I'm thinking of how to realize the mail snoozing feature with notmuch,\r
+>>> so that certain emails won't become visible (in the search) until a\r
+>>> certain day/time (e.g., 10 days from now).\r
+>>> \r
+>>> Using the tag as an absolute date when the mail should become visible\r
+>>> again, tags should be searchable and interpretable as dates. The search\r
+>>> would then be something like: notmuch search tag-as-date < now and\r
+>>> tag:inbox\r
+>>\r
+>> It is not neccessary to make notmuch interpret tags as date - just interpret them yourself ;)\r
+>> You can easily run your own scripts and modify tags/mails. So a simple solution might be:\r
+>> * Add "snoozed" to your notmuch exclude_tags (see config file)\r
+>> * To snooze a mail run in your mail client "tag +snoozed +snoozeby-10-days"\r
+>> or "tag +snoozed +snoozeuntil-2015-01-09"\r
+>> * Your script (e.g. run as cronjob or after notmuch new) now \r
+>> - queries for "tag:snoozed"\r
+>> - looks for snoozeuntil-* tag and parses the tag into a date. If date < now remove snooze-tags.\r
+>> - looks for (relative) snoozeby tag and transform it into (absolute) snoozeuntil tag.\r
+>> (should be not too hard using e.g. the python or ruby bindings)\r
+>\r
+> I actually do something like this. It's not everything Sebastian was\r
+> looking for, but it's very simple, and works great for me.\r
+>\r
+> I use a combination of a "pending" tag and a "byYYYYMMDD" tag.\r
+>\r
+> From cron, I run the following to refile pending mail back to the inbox\r
+> when it comes due:\r
+>\r
+> #!/bin/bash\r
+> DATE_STR=$(date +'%Y%m%d')\r
+> notmuch tag +inbox -pending -by$DATE_STR -- tag:by$DATE_STR\r
+>\r
+> and in Emacs, I use the following key binding to snooze mail (or in the Mutt\r
+> terminology I borrowed, `postpone' it, hence the key):\r
+>\r
+> (define-key notmuch-search-mode-map "P"\r
+> (lambda ()\r
+> "postpone message (remove inbox tag, add pending tag and refile date)"\r
+> (interactive)\r
+> (let* ((date-string (format-time-string "%Y%m%d" (org-read-date nil t)))\r
+> (date-tag (concat "+by" date-string)))\r
+> (notmuch-search-tag `("-inbox" "+pending" ,date-tag)))))\r
+> \r
+> (The `org-read-date' function gives me a nice easy way to pick a date\r
+> from a calendar. I bind "P" to the same function in\r
+> notmuch-show-mode-map, too.)\r
+>\r
+> Hope that helps!\r
+>\r
+> Best,\r
+> Richard\r
+>\r
+> _______________________________________________\r
+> notmuch mailing list\r
+> notmuch@notmuchmail.org\r
+> http://notmuchmail.org/mailman/listinfo/notmuch\r