Andreas Kusalananda Kähäri <andreas.kah...@abc.se> writes: > What's so special about the new tags that I'm adding that makes the > unread messages move from "new" to "cur"? I can *see* them getting > moved when I run the tagging. Why is notmuch moving them? The "unread" > tag never changes. > > $ ls "$notmuch_dbdir"/abc/INBOX/new > > 1693487404_0.62384.harpo.local,U=352958,FMD5=7e33429f656f1e6e9d79b29c3f82c57e:2, > > 1693488604_2.29495.harpo.local,U=352962,FMD5=7e33429f656f1e6e9d79b29c3f82c57e:2, > > 1693488604_4.29495.harpo.local,U=352964,FMD5=7e33429f656f1e6e9d79b29c3f82c57e:2, > > 1693488604_5.29495.harpo.local,U=352965,FMD5=7e33429f656f1e6e9d79b29c3f82c57e:2,
Apparently this is intended behaviour (from test/T340-maildir-sync.sh) test_begin_subtest "Message in new with maildir info is moved to cur on any tag change" add_message [filename]='message-with-info-to-be-moved-to-cur:2,' [dir]=new notmuch tag +anytag id:$gen_msg_id output=$(cd "$MAIL_DIR"; ls */message-with-info-to-be-moved-to-cur*) test_expect_equal "$output" "cur/message-with-info-to-be-moved-to-cur:2," That behaviour is about 10 years old. It seems to be based on the idea that files in new/ should not have maildir info. According to the standard [1] (such as it is) When you move a file from new to cur, you have to change its name from uniq to uniq:info. Make sure to preserve the uniq string, so that separate messages can't bump into each other. So in a sense notmuch is "fixing" the maildir. Whether that intervention is needed notmuch to work correctly, I'm not sure. I'd be a bit nervous about changing such an established behaviour of notmuch, but I guess can't completely rule it out without knowing what would break. Maybe you can convince whatever puts files in new/ not to add :2, ? [1]: http://cr.yp.to/proto/maildir.html _______________________________________________ notmuch mailing list -- notmuch@notmuchmail.org To unsubscribe send an email to notmuch-le...@notmuchmail.org