--- /dev/null
+Return-Path: <bremner@tethera.net>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by arlo.cworth.org (Postfix) with ESMTP id 2D65D6DE1995\r
+ for <notmuch@notmuchmail.org>; Fri, 29 Jan 2016 03:53:36 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at cworth.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.309\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.309 tagged_above=-999 required=5 tests=[AWL=0.242,\r
+ RP_MATCHES_RCVD=-0.55, SPF_PASS=-0.001] autolearn=disabled\r
+Received: from arlo.cworth.org ([127.0.0.1])\r
+ by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id 17fkNJxANxvi for <notmuch@notmuchmail.org>;\r
+ Fri, 29 Jan 2016 03:53:34 -0800 (PST)\r
+Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197])\r
+ by arlo.cworth.org (Postfix) with ESMTPS id 634116DE014A\r
+ for <notmuch@notmuchmail.org>; Fri, 29 Jan 2016 03:53:34 -0800 (PST)\r
+Received: from remotemail by fethera.tethera.net with local (Exim 4.84)\r
+ (envelope-from <bremner@tethera.net>)\r
+ id 1aP7bi-0001ve-3C; Fri, 29 Jan 2016 06:52:54 -0500\r
+Received: (nullmailer pid 5656 invoked by uid 1000);\r
+ Fri, 29 Jan 2016 11:53:30 -0000\r
+From: David Bremner <david@tethera.net>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH 1/3] test: replace single giant term with large phrase\r
+Date: Fri, 29 Jan 2016 07:53:11 -0400\r
+Message-Id: <1454068393-5406-2-git-send-email-david@tethera.net>\r
+X-Mailer: git-send-email 2.6.4\r
+In-Reply-To: <1454068393-5406-1-git-send-email-david@tethera.net>\r
+References: <1454068393-5406-1-git-send-email-david@tethera.net>\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.20\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <https://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: <https://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Fri, 29 Jan 2016 11:53:36 -0000\r
+\r
+We only need a long string, not a single long term to trigger batch\r
+mode. The giant term triggers a bug/incompatibility in Xapian 1.3.4\r
+that throws an exception because it is longer than the Xapian term size\r
+limit.\r
+---\r
+ test/T310-emacs.sh | 2 +-\r
+ 1 file changed, 1 insertion(+), 1 deletion(-)\r
+\r
+diff --git a/test/T310-emacs.sh b/test/T310-emacs.sh\r
+index 61bc369..42e3140 100755\r
+--- a/test/T310-emacs.sh\r
++++ b/test/T310-emacs.sh\r
+@@ -130,7 +130,7 @@ test_expect_equal "$output" "thread:XXX 2009-11-18 [4/4] Jjgod Jiang, Alexande\r
+ test_begin_subtest "Add tag (large query)"\r
+ # We use a long query to force us into batch mode and use a funny tag\r
+ # that requires escaping for batch tagging.\r
+-test_emacs "(notmuch-tag (concat \"$os_x_darwin_thread\" \" or \" (make-string notmuch-tag-argument-limit ?x)) (list \"+tag-from-%-large-query\"))"\r
++test_emacs "(notmuch-tag (concat \"$os_x_darwin_thread\" \" or \" (mapconcat #'identity (make-list notmuch-tag-argument-limit \"x\") \"-\")) (list \"+tag-from-%-large-query\"))"\r
+ output=$(notmuch search $os_x_darwin_thread | notmuch_search_sanitize)\r
+ test_expect_equal "$output" "thread:XXX 2009-11-18 [4/4] Jjgod Jiang, Alexander Botero-Lowry; [notmuch] Mac OS X/Darwin compatibility issues (inbox tag-from-%-large-query unread)"\r
+ notmuch tag -tag-from-%-large-query $os_x_darwin_thread\r
+-- \r
+2.6.4\r
+\r