unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* Tag hook
@ 2018-11-25 15:25 Jeffrey Ratcliffe
  2018-11-25 15:55 ` Leo Gaspard
  0 siblings, 1 reply; 2+ messages in thread
From: Jeffrey Ratcliffe @ 2018-11-25 15:25 UTC (permalink / raw)
  To: notmuch

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Tag hook
  2018-11-25 15:25 Tag hook Jeffrey Ratcliffe
@ 2018-11-25 15:55 ` Leo Gaspard
  0 siblings, 0 replies; 2+ messages in thread
From: Leo Gaspard @ 2018-11-25 15:55 UTC (permalink / raw)
  To: Jeffrey Ratcliffe, notmuch

Jeffrey Ratcliffe <jffry@posteo.net> 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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-11-25 15:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-11-25 15:25 Tag hook Jeffrey Ratcliffe
2018-11-25 15:55 ` Leo Gaspard

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).