--- /dev/null
+Return-Path: <gmn-notmuch@m.gmane.org>\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 0E28E431FDB\r
+ for <notmuch@notmuchmail.org>; Wed, 10 Dec 2014 09:05:15 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.7\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
+ tests=[RCVD_IN_DNSWL_LOW=-0.7] 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 PB6xoC6Ngtkk for <notmuch@notmuchmail.org>;\r
+ Wed, 10 Dec 2014 09:05:11 -0800 (PST)\r
+Received: from plane.gmane.org (plane.gmane.org [80.91.229.3])\r
+ (using TLSv1 with cipher AES256-SHA (256/256 bits))\r
+ (No client certificate requested)\r
+ by olra.theworths.org (Postfix) with ESMTPS id 46B95431FBF\r
+ for <notmuch@notmuchmail.org>; Wed, 10 Dec 2014 09:05:11 -0800 (PST)\r
+Received: from list by plane.gmane.org with local (Exim 4.69)\r
+ (envelope-from <gmn-notmuch@m.gmane.org>) id 1XykhC-0007GT-W3\r
+ for notmuch@notmuchmail.org; Wed, 10 Dec 2014 18:05:03 +0100\r
+Received: from c-67-169-117-151.hsd1.ca.comcast.net ([67.169.117.151])\r
+ by main.gmane.org with esmtp (Gmexim 0.1 (Debian))\r
+ id 1AlnuQ-0007hv-00\r
+ for <notmuch@notmuchmail.org>; Wed, 10 Dec 2014 18:05:02 +0100\r
+Received: from richard.lawrence by c-67-169-117-151.hsd1.ca.comcast.net with\r
+ local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00\r
+ for <notmuch@notmuchmail.org>; Wed, 10 Dec 2014 18:05:02 +0100\r
+X-Injected-Via-Gmane: http://gmane.org/\r
+To: notmuch@notmuchmail.org\r
+From: Richard Lawrence <richard.lawrence@berkeley.edu>\r
+Subject: Re: email snoozing in notmuch\r
+Date: Wed, 10 Dec 2014 09:00:17 -0800\r
+Lines: 56\r
+Message-ID: <87bnnbmoda.fsf@berkeley.edu>\r
+References: <87wq60e2q5.fsf@uwaterloo.ca>\r
+ <548800d5ecc8b_551ca3e88c@TP_L520.notmuch>\r
+Mime-Version: 1.0\r
+Content-Type: text/plain; charset=us-ascii\r
+X-Complaints-To: usenet@ger.gmane.org\r
+X-Gmane-NNTP-Posting-Host: c-67-169-117-151.hsd1.ca.comcast.net\r
+User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux)\r
+Cancel-Lock: sha1:I4hxtJlHs/z6q/FZgOii5c3eVFU=\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\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: Wed, 10 Dec 2014 17:05:15 -0000\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