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

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

Date: Sat, 16 Jan 2010 18:33:17 -0800

To: Jameson Rollins

Cc: martin f krafft, notmuch@notmuchmail.org

From: Carl Worth


On Sat, 16 Jan 2010 18:38:40 -0500, Jameson Rollins <jrollins@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
part-000.sig (application/pgp-signature)

Thread: