Tag hook

classic Classic list List threaded Threaded
2 messages Options
Jeffrey Ratcliffe Jeffrey Ratcliffe
Reply | Threaded
Open this post in threaded view
|

Tag hook

Hi all,

Attracted by positive press amongst Debian Developers, and as I am
long-time emacs user, I am looking at switching to notmuch.

My current setup involves a main desktop where I read email via IMAP
with Thunderbird and use a few tags, mostly for a GTD workflow.

Out and about, I have an old notebook which isn't powerful enough for
Thunderbird anymore (so I use Claws), and a phone (K-9).

The latter means that I really don't want to leave email in an inbox,
and would like to have some sort of tag hook so that on tagging as
deleted or spam or removing the inbox tag, the mail would be moved to
the deleted, spam or archive folder, as appropriate.

Is there any suitable hook in notmuch? Or will I have to write some
lisp in notmuch-config.el? In the case of the latter, has anyone
already done something similar?

Regards

Jeff
_______________________________________________
notmuch mailing list
[hidden email]
https://notmuchmail.org/mailman/listinfo/notmuch
Leo Gaspard-3 Leo Gaspard-3
Reply | Threaded
Open this post in threaded view
|

Re: Tag hook

Jeffrey Ratcliffe <[hidden email]> writes:
> Is there any suitable hook in notmuch? Or will I have to write some
> lisp in notmuch-config.el? In the case of the latter, has anyone
> already done something similar?

Not exactly what you're asking for, but I personally handle this issue
with commands like this in my automatically-tagging script:

```
notmuch search --format=text0 --output=files tag:junk and not folder:Junk | \
    xargs -0I '{}' mv '{}' /.../Junk/cur/
```

It's not exactly a tag hook, but as it's run before and after any sync
with my IMAP folder, it works well enough for my use case.
_______________________________________________
notmuch mailing list
[hidden email]
https://notmuchmail.org/mailman/listinfo/notmuch