From: David Bremner Date: Wed, 2 Sep 2015 23:05:35 +0000 (+2100) Subject: Re: muchsync files renames X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=1f4c8d8595b5eb7b7a3f1705e7aab774a1abeac0;p=notmuch-archives.git Re: muchsync files renames --- diff --git a/80/dbdf257ffe4d8977c626d7896c7301bfc07246 b/80/dbdf257ffe4d8977c626d7896c7301bfc07246 new file mode 100644 index 000000000..e6de46995 --- /dev/null +++ b/80/dbdf257ffe4d8977c626d7896c7301bfc07246 @@ -0,0 +1,97 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by arlo.cworth.org (Postfix) with ESMTP id 867D76DE0FF8 + for ; Wed, 2 Sep 2015 16:07:04 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at cworth.org +X-Spam-Flag: NO +X-Spam-Score: 0.114 +X-Spam-Level: +X-Spam-Status: No, score=0.114 tagged_above=-999 required=5 tests=[AWL=0.114] + autolearn=disabled +Received: from arlo.cworth.org ([127.0.0.1]) + by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id SKIr0lW4b9Z1 for ; + Wed, 2 Sep 2015 16:07:01 -0700 (PDT) +Received: from gitolite.debian.net (gitolite.debian.net [87.98.215.224]) + by arlo.cworth.org (Postfix) with ESMTPS id 95E916DE0B25 + for ; Wed, 2 Sep 2015 16:07:01 -0700 (PDT) +Received: from remotemail by gitolite.debian.net with local (Exim 4.80) + (envelope-from ) + id 1ZXH6K-0004MY-0S; Wed, 02 Sep 2015 23:05:56 +0000 +Received: (nullmailer pid 27808 invoked by uid 1000); Wed, 02 Sep 2015 + 23:05:35 -0000 +From: David Bremner +To: Amadeusz =?utf-8?B?xbtvxYJub3dza2k=?= , David + Mazieres expires 2015-11-29 PST + +Subject: Re: muchsync files renames +In-Reply-To: <87r3mgldor.fsf@freja.aidecoe.name> +References: <878u93ujdo.fsf@freja.aidecoe.name> + <876146o920.fsf@ta.scs.stanford.edu> <871teu8kdd.fsf@freja.aidecoe.name> + <87oahxojlv.fsf@ta.scs.stanford.edu> <87vbbwnbb4.fsf@freja.aidecoe.name> + <87io7wr50y.fsf@ta.scs.stanford.edu> <87k2sbmzww.fsf@freja.aidecoe.name> + <87oahnmkqf.fsf@ta.scs.stanford.edu> <87egijm7kw.fsf@freja.aidecoe.name> + <878u8rvxap.fsf@ta.scs.stanford.edu> <87613tn45m.fsf@freja.aidecoe.name> + <87vbbthd1m.fsf@maritornes.cs.unb.ca> <87r3mgldor.fsf@freja.aidecoe.name> +User-Agent: Notmuch/0.20.2+60~gcb08a2e (http://notmuchmail.org) Emacs/24.5.1 + (x86_64-pc-linux-gnu) +Date: Wed, 02 Sep 2015 20:05:35 -0300 +Message-ID: <87r3mge81s.fsf@maritornes.cs.unb.ca> +MIME-Version: 1.0 +Content-Type: text/plain; charset=utf-8 +Content-Transfer-Encoding: quoted-printable +Cc: notmuch@notmuchmail.org +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.18 +Precedence: list +List-Id: "Use and development of the notmuch mail system." + +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +X-List-Received-Date: Wed, 02 Sep 2015 23:07:04 -0000 + +Amadeusz =C5=BBo=C5=82nowski 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 +=20=20=20=20=20 +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