notmuch_message_maildir_flags_to_tags

Add/remove tags according to maildir flags in the message filename(s).

This function examines the filenames of 'message' for maildir flags, and adds or removes tags on 'message' as follows when these flags are present:

* Flag Action if present * ---- ----------------- * 'D' Adds the "draft" tag to the message * 'F' Adds the "flagged" tag to the message * 'P' Adds the "passed" tag to the message * 'R' Adds the "replied" tag to the message * 'S' Removes the "unread" tag from the message

For each flag that is not present, the opposite action (add/remove) is performed for the corresponding tags.

Flags are identified as trailing components of the filename after a sequence of ":2,".

If there are multiple filenames associated with this message, the flag is considered present if it appears in one or more filenames. (That is, the flags from the multiple filenames are combined with the logical OR operator.)

A client can ensure that notmuch database tags remain synchronized with maildir flags by calling this function after each call to notmuch_database_add_message. See also notmuch_message_tags_to_maildir_flags for synchronizing tag changes back to maildir flags.

version(DerelictNotMuch_Static)nothrow
notmuch_message_maildir_flags_to_tags
(
notmuch_message_t* message
)

Meta