aerc/worker/notmuch
Julian Pidancet f20933f512 notmuch: move new maildir files to cur upon opening a folder
By default "notmuch new" will index files in place and won't move new
files from the new/ directory to cur/ because it assumes that is the
job of the email client.
During normal operation, once moved by the client, the "notmuch new"
command will "fix" the database by detecting file renames.
This workflow is a problem because we need to move the new/ files to
cur/, otherwise the maildir lib will not work properly, but at the same
time we cannot afford the notmuch database to be out of sync with the
location of message files on disk, because we rely on it for listing
folders, displaying emails, ect...

This change uses a trick that request notmuch to synchronize message
tags to maildir flags, that will effectively rename new files and cause
them to be moved into the cur/ directory.

Signed-off-by: Julian Pidancet <julian.pidancet@oracle.com>
Acked-by: Robin Jarry <robin@jarry.cc>
Acked-by: Tim Culverhouse <tim@timculverhouse.com>
2022-10-27 21:45:31 +02:00
..
lib notmuch: add MsgIDFromFilename method to notmuch.DB 2022-10-27 21:45:31 +02:00
eventhandlers.go notmuch: simplify DirectoryInfo emitting logic 2022-10-27 21:45:31 +02:00
events.go lint: remove unused structs and functions (unused) 2022-08-04 21:57:48 +02:00
message.go notmuch: add maildir support 2022-10-27 21:45:24 +02:00
worker.go notmuch: move new maildir files to cur upon opening a folder 2022-10-27 21:45:31 +02:00