[notmuch] inbox/unread tags for new messages [was: Re: Thoughts on notmuch and Lua]

Carl Worth cworth at cworth.org
Sat Jan 16 18:33:17 PST 2010


On Sat, 16 Jan 2010 18:38:40 -0500, Jameson Rollins <jrollins at finestructure.net> wrote:
> Is it really a scheme change that would require delicate handling?

Yes.

> I would think that the change would be fairly straightforward:
> 
> - if notmuch sees that a message in the maildir has moved from new to
>   cur and/or the S flag has been added then any 'unread' flags should
>   be removed from the message.
> 
> - if a 'unread' tag is removed from a message, then the message S flag
>   should be added.

I have thousands of messages that I have read with sup and notmuch. The
filenames have never changed since the mail was originally delivered by
maildrop. So these messages are all in "new" directories, do not have
the 'S' flag in the filename, and do not have an "unread" tag.

So the database and the filesystem are currently inconsistent and
neither of the above state changes will trigger for any of these
messages.

Things "work" fine for me now because I'm treating the database state as
authoritative and ignoring the names of the files. Your proposal is to
treat the filenames as authoritative, so will require an additional
step, (to copy the current state from the database to the file names),
besides what you've outlineed above.

-Carl
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20100116/96a6e657/attachment.pgp>


More information about the notmuch mailing list