--- /dev/null
+Return-Path: <pieter@praet.org>\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 34C44431FC2\r
+ for <notmuch@notmuchmail.org>; Wed, 22 Feb 2012 10:45:57 -0800 (PST)\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 lNH9Ebpo2pOP for <notmuch@notmuchmail.org>;\r
+ Wed, 22 Feb 2012 10:45:55 -0800 (PST)\r
+Received: from mail-we0-f181.google.com (mail-we0-f181.google.com\r
+ [74.125.82.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+ (No client certificate requested)\r
+ by olra.theworths.org (Postfix) with ESMTPS id 686B5431FAE\r
+ for <notmuch@notmuchmail.org>; Wed, 22 Feb 2012 10:45:55 -0800 (PST)\r
+Received: by werp13 with SMTP id p13so266664wer.26\r
+ for <notmuch@notmuchmail.org>; Wed, 22 Feb 2012 10:45:54 -0800 (PST)\r
+Received-SPF: pass (google.com: domain of pieter@praet.org designates\r
+ 10.180.80.8 as permitted sender) client-ip=10.180.80.8; \r
+Authentication-Results: mr.google.com;\r
+ spf=pass (google.com: domain of pieter@praet.org\r
+ designates 10.180.80.8 as permitted sender)\r
+ smtp.mail=pieter@praet.org\r
+Received: from mr.google.com ([10.180.80.8])\r
+ by 10.180.80.8 with SMTP id n8mr38112571wix.14.1329936354277 (num_hops\r
+ = 1); Wed, 22 Feb 2012 10:45:54 -0800 (PST)\r
+MIME-Version: 1.0\r
+Received: by 10.180.80.8 with SMTP id n8mr31571953wix.14.1329936354098;\r
+ Wed, 22 Feb 2012 10:45:54 -0800 (PST)\r
+Received: from localhost ([109.131.181.26])\r
+ by mx.google.com with ESMTPS id s8sm30939325wiz.8.2012.02.22.10.45.53\r
+ (version=TLSv1/SSLv3 cipher=OTHER);\r
+ Wed, 22 Feb 2012 10:45:53 -0800 (PST)\r
+From: Pieter Praet <pieter@praet.org>\r
+To: Notmuch Mail <notmuch@notmuchmail.org>\r
+Subject: [PATCH v2 2/7] test: emacs: new tests "notmuch-show: {,\r
+ un}collapse all messages in thread"\r
+Date: Wed, 22 Feb 2012 19:43:29 +0100\r
+Message-Id: <1329936214-30959-2-git-send-email-pieter@praet.org>\r
+X-Mailer: git-send-email 1.7.8.1\r
+In-Reply-To: <1327469139-1968-1-git-send-email-pieter@praet.org>\r
+References: <1327469139-1968-1-git-send-email-pieter@praet.org>\r
+X-Gm-Message-State:\r
+ ALoCoQn6bfw2D7L8ZNJps5hTyWtLQEnVAm/l3aj9lUsrD86sCT1y+SpmE1T4GwfJQUlteNYTzUCx\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: Wed, 22 Feb 2012 18:45:57 -0000\r
+\r
+* test/emacs:\r
+\r
+ - New subtest "notmuch-show: collapse all messages in thread":\r
+ `notmuch-show-open-or-close-all' with prefix arg ("C-u M-RET")\r
+ collapses all messages in thread.\r
+\r
+ - New subtest "notmuch-show: uncollapse all messages in thread":\r
+ `notmuch-show-open-or-close-all' without prefix arg ("M-RET")\r
+ uncollapses all messages in thread.\r
+---\r
+ test/emacs | 13 +++\r
+ ...notmuch-show-thread-with-all-messages-collapsed | 4 +\r
+ ...tmuch-show-thread-with-all-messages-uncollapsed | 79 ++++++++++++++++++++\r
+ 3 files changed, 96 insertions(+), 0 deletions(-)\r
+ create mode 100644 test/emacs.expected-output/notmuch-show-thread-with-all-messages-collapsed\r
+ create mode 100644 test/emacs.expected-output/notmuch-show-thread-with-all-messages-uncollapsed\r
+\r
+diff --git a/test/emacs b/test/emacs\r
+index f9ea1c3..7d6e6ee 100755\r
+--- a/test/emacs\r
++++ b/test/emacs\r
+@@ -408,6 +408,19 @@ test_emacs \\r
+ (test-visible-output))'\r
+ test_expect_equal_file OUTPUT $EXPECTED/notmuch-show-message-with-headers-hidden\r
+ \r
++test_begin_subtest "notmuch-show: collapse all messages in thread"\r
++test_emacs '(notmuch-show "id:f35dbb950911171435ieecd458o853c873e35f4be95@mail.gmail.com")\r
++ (let ((current-prefix-arg t))\r
++ (notmuch-show-open-or-close-all)\r
++ (test-visible-output))'\r
++test_expect_equal_file OUTPUT $EXPECTED/notmuch-show-thread-with-all-messages-collapsed\r
++\r
++test_begin_subtest "notmuch-show: uncollapse all messages in thread"\r
++test_emacs '(notmuch-show "id:f35dbb950911171435ieecd458o853c873e35f4be95@mail.gmail.com")\r
++ (notmuch-show-open-or-close-all)\r
++ (test-visible-output)'\r
++test_expect_equal_file OUTPUT $EXPECTED/notmuch-show-thread-with-all-messages-uncollapsed\r
++\r
+ test_begin_subtest "Stashing in notmuch-show"\r
+ add_message '[date]="Sat, 01 Jan 2000 12:00:00 -0000"' \\r
+ '[from]="Some One <someone@somewhere.org>"' \\r
+diff --git a/test/emacs.expected-output/notmuch-show-thread-with-all-messages-collapsed b/test/emacs.expected-output/notmuch-show-thread-with-all-messages-collapsed\r
+new file mode 100644\r
+index 0000000..73b0e60\r
+--- /dev/null\r
++++ b/test/emacs.expected-output/notmuch-show-thread-with-all-messages-collapsed\r
+@@ -0,0 +1,4 @@\r
++Jan Janak <jan@ryngle.com> (2009-11-17) (inbox)\r
++Subject: [notmuch] What a great idea!\r
++ Jan Janak <jan@ryngle.com> (2009-11-17) (inbox)\r
++ Carl Worth <cworth@cworth.org> (2009-11-18) (inbox unread)\r
+diff --git a/test/emacs.expected-output/notmuch-show-thread-with-all-messages-uncollapsed b/test/emacs.expected-output/notmuch-show-thread-with-all-messages-uncollapsed\r
+new file mode 100644\r
+index 0000000..bd5598e\r
+--- /dev/null\r
++++ b/test/emacs.expected-output/notmuch-show-thread-with-all-messages-uncollapsed\r
+@@ -0,0 +1,79 @@\r
++Jan Janak <jan@ryngle.com> (2009-11-17) (inbox)\r
++Subject: [notmuch] What a great idea!\r
++To: notmuch@notmuchmail.org\r
++Date: Tue, 17 Nov 2009 23:35:30 +0100\r
++\r
++Hello,\r
++\r
++First of all, notmuch is a wonderful idea, both the cmdline tool and\r
++the emacs interface! Thanks a lot for writing it, I was really excited\r
++when I read the announcement today.\r
++\r
++Have you considered sending an announcement to the org-mode mailing list?\r
++http://org-mode.org\r
++\r
++Various ways of searching/referencing emails from emacs were discussed\r
++there several times and none of them were as elegant as notmuch (not\r
++even close). Maybe notmuch would attract some of the developers\r
++there..\r
++\r
++ -- Jan\r
++ Jan Janak <jan@ryngle.com> (2009-11-17) (inbox)\r
++ Subject: [notmuch] What a great idea!\r
++ To: notmuch@notmuchmail.org\r
++ Date: Tue, 17 Nov 2009 23:38:47 +0100\r
++\r
++ On Tue, Nov 17, 2009 at 11:35 PM, Jan Janak <jan at ryngle.com> wrote:\r
++ > Hello,\r
++ >\r
++ > First of all, notmuch is a wonderful idea, both the cmdline tool and\r
++ [ 2 more citation lines. Click/Enter to show. ]\r
++ >\r
++ > Have you considered sending an announcement to the org-mode mailing list?\r
++ > http://org-mode.org\r
++\r
++ Sorry, wrong URL, the correct one is: http://orgmode.org\r
++\r
++ > Various ways of searching/referencing emails from emacs were discussed\r
++ > there several times and none of them were as elegant as notmuch (not\r
++ > even close). Maybe notmuch would attract some of the developers\r
++ > there..\r
++\r
++ -- Jan\r
++ Carl Worth <cworth@cworth.org> (2009-11-18) (inbox unread)\r
++ Subject: [notmuch] What a great idea!\r
++ To: notmuch@notmuchmail.org\r
++ Date: Wed, 18 Nov 2009 02:49:52 -0800\r
++\r
++ On Tue, 17 Nov 2009 23:35:30 +0100, Jan Janak <jan at ryngle.com> wrote:\r
++ > First of all, notmuch is a wonderful idea, both the cmdline tool and\r
++ > the emacs interface! Thanks a lot for writing it, I was really excited\r
++ > when I read the announcement today.\r
++\r
++ Ah, here's where I planned a nice welcome. So welcome (again), Jan! :-)\r
++\r
++ I've been having a lot of fun with notmuch already, (though there have\r
++ been some days of pain before it was functional enough and my\r
++ email-reply latency went way up). But regardless---I got through that,\r
++ and I'm able to work more efficiently with notmuch now than I could with\r
++ sup before. So I'm happy.\r
++\r
++ And I'm delighted when other people find this interesting as well.\r
++\r
++ > Have you considered sending an announcement to the org-mode mailing list?\r
++ > http://orgmode.org\r
++\r
++ Thanks for the idea. I think I may have looked into org-mode years ago,\r
++ (when I was investigating planner-mode and various emacs "personal wiki"\r
++ systems for keeping random notes and what-not).\r
++\r
++ > Various ways of searching/referencing emails from emacs were discussed\r
++ > there several times and none of them were as elegant as notmuch (not\r
++ > even close). Maybe notmuch would attract some of the developers\r
++ > there..\r
++\r
++ Yeah. I'll drop them a mail. Having a real emacs wizard on board would\r
++ be nice. (I'm afraid the elisp I've written so far for this project is\r
++ fairly grim.)\r
++\r
++ -Carl\r
+-- \r
+1.7.8.1\r
+\r