unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Franz Fellner <alpine.art.de@gmail.com>
To: Sebastian Fischmeister <sfischme@uwaterloo.ca>
Cc: notmuch@notmuchmail.org
Subject: RE: email snoozing in notmuch
Date: Wed, 10 Dec 2014 09:14:14 +0100	[thread overview]
Message-ID: <548800d5ecc8b_551ca3e88c@TP_L520.notmuch> (raw)
In-Reply-To: <87wq60e2q5.fsf@uwaterloo.ca>

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

  reply	other threads:[~2014-12-10  8:13 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-10  1:03 email snoozing in notmuch Sebastian Fischmeister
2014-12-10  8:14 ` Franz Fellner [this message]
2014-12-10 17:00   ` Richard Lawrence
2014-12-21 15:54     ` Sebastian Fischmeister
  -- strict thread matches above, loose matches on Subject: below --
2014-12-11 15:41 Trevor Jim

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=548800d5ecc8b_551ca3e88c@TP_L520.notmuch \
    --to=alpine.art.de@gmail.com \
    --cc=notmuch@notmuchmail.org \
    --cc=sfischme@uwaterloo.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).