email snoozing in notmuch
Franz Fellner
alpine.art.de at gmail.com
Wed Dec 10 00:14:14 PST 2014
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 at notmuchmail.org
> http://notmuchmail.org/mailman/listinfo/notmuch
More information about the notmuch
mailing list