Re: Folder+tags

Subject: Re: Folder+tags

Date: Fri, 25 Dec 2020 18:27:24 +0100

To: Jaume Devesa, notmuch@notmuchmail.org

Cc:

From: inwit


On Fri Dec 25, 2020 at 9:04 AM CET, Jaume Devesa wrote:
> I sync my email with offlineimap and I do something similar, but using
> the `presync.sh` hook that offlineimap provides, via simple `xargs`:
>
> notmuch search --output=files --format=text0 \ folder:mailbox/INBOX
> -tag:inbox | xargs -0 --no-run-if-empty \ mv -t
> ~/mail/mailbox/Archive/$YEAR/new/
This is what I was considering so far, but the truth is that my
emacs lisp programming capabilities are still not that strong. 

In any case, I guess I'd need to parameterize the command you propose,
thus making it applicable for any folder/tag. Something like:

notmuch search --output=files --format=text0 tag:$1 AND tag:inbox | \
xargs -0 --no-run-if-empty mv -t ~/mail/$1/new

Then I should plug this somehow into the notmuch-after-tag-hook, where
the recently applied tag and the message id should be available. Does
that sound reasonable to anyone in the list?

> I've never used emacs, so I ignore if you can do something similar by
> binding keys in emacs (but I guess you can).
It is possible for sure, but I'm afraid it'd take an actual lisp
programmer...

> Hope that helps,
It does. Thanks!!

Salud,
_______________________________________________
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-leave@notmuchmail.org

Thread: