Hello,
> What I would like to, then, is to use notmuch-el to read and classify my
> mail. And the functionality I'm missing at the moment is a way to move
> an email from the inbox to its corresponding folder, hopefully updating
> its folder tags at the same time. That is: I would (mb)sync my mail from
> my company's IMAP server to my Maildir folder structure, then I'd go to
> the Inbox tag/folder, I'd read my mail and then, by hitting Shift+m, for
> example, I'd be able to move that precise email, both in files and tags,
> to its corresponding Maildir folder, so my next call to mbsync actually
> moves the message in the IMAP server folders as well. Does that make
> sense? Does anyone know how would I get to something like that?
>
> Again, sorry if this is redundant, and congratulations on the good work.
>
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/
So just before offlineimap starts another round of sync, the emails
tagged as 'not inbox' inside the INBOX folder are being moved to the
Archive/${YEAR} folder.
I've never used emacs, so I ignore if you can do something similar by
binding keys in emacs (but I guess you can).
Hope that helps,