--- /dev/null
+Return-Path: <amdragon@mit.edu>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by olra.theworths.org (Postfix) with ESMTP id 07578431FB6\r
+ for <notmuch@notmuchmail.org>; Sun, 3 Jun 2012 09:58:15 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.7\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
+ tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+ by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id yLDV6ybHZQ5W for <notmuch@notmuchmail.org>;\r
+ Sun, 3 Jun 2012 09:58:14 -0700 (PDT)\r
+Received: from dmz-mailsec-scanner-5.mit.edu (DMZ-MAILSEC-SCANNER-5.MIT.EDU\r
+ [18.7.68.34])\r
+ by olra.theworths.org (Postfix) with ESMTP id 6BD4F431FAE\r
+ for <notmuch@notmuchmail.org>; Sun, 3 Jun 2012 09:58:14 -0700 (PDT)\r
+X-AuditID: 12074422-b7f1f6d00000090b-64-4fcb97a540a1\r
+Received: from mailhub-auth-2.mit.edu ( [18.7.62.36])\r
+ by dmz-mailsec-scanner-5.mit.edu (Symantec Messaging Gateway) with SMTP\r
+ id 87.47.02315.5A79BCF4; Sun, 3 Jun 2012 12:58:14 -0400 (EDT)\r
+Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103])\r
+ by mailhub-auth-2.mit.edu (8.13.8/8.9.2) with ESMTP id q53GwDUE027666; \r
+ Sun, 3 Jun 2012 12:58:13 -0400\r
+Received: from drake.dyndns.org\r
+ (209-6-116-242.c3-0.arl-ubr1.sbo-arl.ma.cable.rcn.com\r
+ [209.6.116.242]) (authenticated bits=0)\r
+ (User authenticated as amdragon@ATHENA.MIT.EDU)\r
+ by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id q53GwCTE004200\r
+ (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);\r
+ Sun, 3 Jun 2012 12:58:12 -0400 (EDT)\r
+Received: from amthrax by drake.dyndns.org with local (Exim 4.77)\r
+ (envelope-from <amdragon@mit.edu>)\r
+ id 1SbE7j-00037o-3B; Sun, 03 Jun 2012 12:57:51 -0400\r
+From: Austin Clements <amdragon@MIT.EDU>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH 1/4] test: Add broken test for tag synchronization on files\r
+ delivered to new/\r
+Date: Sun, 3 Jun 2012 12:57:33 -0400\r
+Message-Id: <1338742656-11640-2-git-send-email-amdragon@mit.edu>\r
+X-Mailer: git-send-email 1.7.10\r
+In-Reply-To: <1338742656-11640-1-git-send-email-amdragon@mit.edu>\r
+References: <1338742656-11640-1-git-send-email-amdragon@mit.edu>\r
+X-Brightmail-Tracker:\r
+ H4sIAAAAAAAAA+NgFtrLIsWRmVeSWpSXmKPExsUixG6norts+ml/gysuFtdvzmR2YPR4tuoW\r
+ cwBjFJdNSmpOZllqkb5dAlfGsXUb2Qt281UsOX+IrYGxn6eLkZNDQsBEomH7ZSYIW0ziwr31\r
+ bF2MXBxCAvsYJfbv+s8I4axnlLj7azYrhPOQSWLhmRdQzlxGifPnFrGC9LMJaEhs27+cEcQW\r
+ EZCW2HkXpIODg1lATeJPlwpIWFggVmLt5U9sIDaLgKrExwd3wMp5BRwk/lx/zQhxhrzE0/t9\r
+ bCCtnAKOEr0HTEDCQkAlHxqusE9g5F/AyLCKUTYlt0o3NzEzpzg1Wbc4OTEvL7VI11QvN7NE\r
+ LzWldBMjOGRclHYw/jyodIhRgINRiYf306xT/kKsiWXFlbmHGCU5mJREeadNPe0vxJeUn1KZ\r
+ kVicEV9UmpNafIhRgoNZSYS30w4ox5uSWFmVWpQPk5LmYFES512judtfSCA9sSQ1OzW1ILUI\r
+ JivDwaEkwXt+GlCjYFFqempFWmZOCUKaiYMTZDgP0HCwGt7igsTc4sx0iPwpRl2O05MuXWcU\r
+ YsnLz0uVEue9BlIkAFKUUZoHNwcW668YxYHeEuZ9CVLFA0wTcJNeAS1hAlpicPgkyJKSRISU\r
+ VAPjxOVJ2z8svLtUIa/+KdO5X/7fWV+2SawtY1tb2qv6fVftl4zw7qUXd9nMUX/5VH/F9/U5\r
+ z8UWTb/xYbu6gqPm/8vd9rNW78/1DOipXGteeuXaCbXJ+/64Gr9Zv+3OjXfqBhWdh9VW62is\r
+ v1i1taHHh1vq3Yf/z6RyXlm4LTi8cs7hqrezHjrZ/VNiKc5INNRiLipOBAAELFiN0AIAAA==\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Sun, 03 Jun 2012 16:58:15 -0000\r
+\r
+Currently, notmuch new only synchronizs maildir flags to tags for\r
+files that have an "info" part. However, in maildir, new mail doesn't\r
+gain the info part until it moves from new/ to cur/. Hence, even\r
+though mail in new/ doesn't have an info part, it is still a maildir\r
+message and thus has maildir flags (though none of them set).\r
+\r
+The most visible effect of not synchronizing maildir flags for\r
+messages in new/ is that newly delivered messages don't get the unread\r
+tag (unless it is assigned by some other mechanism, like new.tags).\r
+\r
+This patch does *not* modify the test for messages in cur/ that do not\r
+have an "info" part. Unlike a message in new/, a message in cur/\r
+without an info part is no longer a maildir message, and thus\r
+shouldn't be subject to maildir flag synchronization.\r
+---\r
+ test/maildir-sync | 10 ++++++++++\r
+ 1 file changed, 10 insertions(+)\r
+\r
+diff --git a/test/maildir-sync b/test/maildir-sync\r
+index d72ec07..6360fd2 100755\r
+--- a/test/maildir-sync\r
++++ b/test/maildir-sync\r
+@@ -166,4 +166,14 @@ add_message [subject]='"Non-compliant maildir info"' [dir]=cur [filename]='non-c\r
+ notmuch tag +unread +draft -flagged subject:"Non-compliant maildir info"\r
+ test_expect_equal "$(cd $MAIL_DIR/cur/; ls non-compliant*)" "non-compliant-maildir-info:2,These-are-not-flags-in-ASCII-order-donottouch"\r
+ \r
++test_begin_subtest "Files in new/ get default synchronized tags"\r
++test_subtest_known_broken\r
++OLDCONFIG=$(notmuch config get new.tags)\r
++notmuch config set new.tags test\r
++add_message [subject]='"File in new/"' [dir]=new [filename]='file-in-new'\r
++notmuch config set new.tags $OLDCONFIG\r
++notmuch search 'subject:"File in new"' | notmuch_search_sanitize > output\r
++test_expect_equal "$(< output)" \\r
++"thread:XXX 2001-01-05 [1/1] Notmuch Test Suite; File in new/ (test unread)"\r
++\r
+ test_done\r
+-- \r
+1.7.10\r
+\r