muchsync files renames

David Bremner david at tethera.net
Wed Sep 2 16:05:35 PDT 2015


Amadeusz Żołnowski <aidecoe at aidecoe.name> writes:

> When I have added 'unread' tag the file was still in new/. Only after
> removing 'unread' afterwards the file has been moved to cur/.

The unread tag corresponds to the *absence* of the ,S flag, so if you
don't add unread at notmuch new, tagging it unread later is effectively
a no-op from the point of view of maildir-flag synching. I guess the
part that is optional is moving from new/foo to cur/foo:2, . I believe
we used to be more aggressive about doing this, but mutt users
complained.

> So it seems you're right, but take a look at the following excerpt
> from T340-maildir-sync.sh:
>
[...]
> What is different about the test case and my case is that my mail file
> doesn't have ":2," suffix. Adding the suffix to file name makes it
> working as expect by test case. I see I would have to convert my mail
> files names, but I think this inconsistency in notmuch should also take
> some attention.

Have a look at

     http://cr.yp.to/proto/maildir.html
     http://www.qmail.org/man/man5/maildir.html
     
I don't think messages in new are supposed to have : in their names. So
this test is dealing with a corner case of some out-of-spec MUA writing
:info onto the filename. So I don't think adding a suffix is the right
thing to do here. It also seems like leaving a message in new/ when
tagging it as unread is a reasonable option.

The gory details (per David's earlier request) are in
_new_maildir_filename in lib/message.cc.


d


More information about the notmuch mailing list