From: Franz Fellner Date: Wed, 10 Dec 2014 08:14:14 +0000 (+0100) Subject: RE: email snoozing in notmuch X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=3dcf99a338e7d991c41022b4754810067e4fba3c;p=notmuch-archives.git RE: email snoozing in notmuch --- diff --git a/aa/6363a49572a4a8bffb881f65dd1c5942d90c72 b/aa/6363a49572a4a8bffb881f65dd1c5942d90c72 new file mode 100644 index 000000000..a33cd8b6c --- /dev/null +++ b/aa/6363a49572a4a8bffb881f65dd1c5942d90c72 @@ -0,0 +1,120 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by olra.theworths.org (Postfix) with ESMTP id 17270431FDA + for ; Wed, 10 Dec 2014 00:13:58 -0800 (PST) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -0.799 +X-Spam-Level: +X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5 + tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, + FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled +Received: from olra.theworths.org ([127.0.0.1]) + by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id t+WFJlPdUHbf for ; + Wed, 10 Dec 2014 00:13:53 -0800 (PST) +Received: from mail-wg0-f49.google.com (mail-wg0-f49.google.com + [74.125.82.49]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client + certificate requested) by olra.theworths.org (Postfix) with ESMTPS id + 9D1DA431FC3 for ; Wed, 10 Dec 2014 00:13:53 -0800 + (PST) +Received: by mail-wg0-f49.google.com with SMTP id n12so2885914wgh.8 + for ; Wed, 10 Dec 2014 00:13:52 -0800 (PST) +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; + h=date:from:to:cc:message-id:in-reply-to:references:subject + :mime-version:content-type:content-transfer-encoding:attach; + bh=Ynvi6iuJSgazzoPCaoOOITFLbewfs+nT6XD8GFzMYT4=; + b=WaGDuotOe0HrHW0BqmoJ17vNVe8Yhog3I2v3WOa6UfOWCijbAHMj2I+ZDEj+nGXyyn + IGLP4xAzicIZ3y34gQJk/cH6gkDLJQrsUFcD3JW4cYboWIqwphm/fvftQnBE4xQmNi9N + MVG/LYazJuUCccJqQQH696apA+2O9c+RP+uSLUVHoOj5vF+jxNuTxnHg/BjOUojc1NLm + eT4HmvPnT/oSa7DRg4i4Oo0IxDTOqGFUq/jjwE/G/g6nuEh8ch5saeoMEmcFn9LtdTY6 + 8WjR6TVYZ3hHosP78z42qWJw6/iFir9dTi4chsUBO2hFkBMC6oHAd+fi3LszmEQWXTiV + xeMw== +X-Received: by 10.180.72.199 with SMTP id f7mr4105176wiv.53.1418199232392; + Wed, 10 Dec 2014 00:13:52 -0800 (PST) +Received: from localhost (p4FFB8E50.dip0.t-ipconnect.de. [79.251.142.80]) + by mx.google.com with ESMTPSA id dg7sm5297762wib.24.2014.12.10.00.13.50 + for + (version=TLSv1.2 cipher=RC4-SHA bits=128/128); + Wed, 10 Dec 2014 00:13:51 -0800 (PST) +Date: Wed, 10 Dec 2014 09:14:14 +0100 +From: Franz Fellner +To: Sebastian Fischmeister +Message-ID: <548800d5ecc8b_551ca3e88c@TP_L520.notmuch> +In-Reply-To: <87wq60e2q5.fsf@uwaterloo.ca> +References: <87wq60e2q5.fsf@uwaterloo.ca> +Subject: RE: email snoozing in notmuch +Mime-Version: 1.0 +Content-Type: text/plain; + charset=utf-8 +Content-Transfer-Encoding: 7bit +Attach: +Cc: notmuch@notmuchmail.org +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.13 +Precedence: list +List-Id: "Use and development of the notmuch mail system." + +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +X-List-Received-Date: Wed, 10 Dec 2014 08:13:58 -0000 + +Hi, + +Sebastian Fischmeister wrote: +> Hi, +> +> I'm thinking of how to realize the mail snoozing feature with notmuch, +> so that certain emails won't become visible (in the search) until a +> certain day/time (e.g., 10 days from now). +> +> Using the tag as an absolute date when the mail should become visible +> again, tags should be searchable and interpretable as dates. The search +> would then be something like: notmuch search tag-as-date < now and +> tag:inbox + +It is not neccessary to make notmuch interpret tags as date - just interpret them yourself ;) +You can easily run your own scripts and modify tags/mails. So a simple solution might be: +* Add "snoozed" to your notmuch exclude_tags (see config file) +* To snooze a mail run in your mail client "tag +snoozed +snoozeby-10-days" + or "tag +snoozed +snoozeuntil-2015-01-09" +* Your script (e.g. run as cronjob or after notmuch new) now + - queries for "tag:snoozed" + - looks for snoozeuntil-* tag and parses the tag into a date. If date < now remove snooze-tags. + - looks for (relative) snoozeby tag and transform it into (absolute) snoozeuntil tag. +(should be not too hard using e.g. the python or ruby bindings) + +Of course you can use an own email header to store the snoozeuntil value. +With such a header it should be possible to use afew [1] for automated snooze-tag-management +instead of a hand-crafted script. + +Regards +Franz + +[1] https://github.com/teythoon/afew + +> +> Using the receive date as base and encoding the delay as relative time +> from that, would still need the ability to interpret tag values as +> numbers: +> +> notmuch search date:01012011..15days and tag-as-number < 10 and tag:inbox +> +> Any ideas how the snoozing feature can be implemented with what is +> already present in notmuch? +> +> Thanks, +> Sebastian +> _______________________________________________ +> notmuch mailing list +> notmuch@notmuchmail.org +> http://notmuchmail.org/mailman/listinfo/notmuch + +