--- /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 3693D431FC3\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 OzqDHha6vWRo for <notmuch@notmuchmail.org>;\r
+ Wed, 22 Feb 2012 10:45:55 -0800 (PST)\r
+Received: from mail-ww0-f45.google.com (mail-ww0-f45.google.com\r
+ [74.125.82.45]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client\r
+ certificate requested) by olra.theworths.org (Postfix) with ESMTPS id\r
+ 7757F431FB6 for <notmuch@notmuchmail.org>; Wed, 22 Feb 2012 10:45:55 -0800\r
+ (PST)\r
+Received: by wgbdt12 with SMTP id dt12so311625wgb.2\r
+ for <notmuch@notmuchmail.org>; Wed, 22 Feb 2012 10:45:52 -0800 (PST)\r
+Received-SPF: pass (google.com: domain of pieter@praet.org designates\r
+ 10.180.92.73 as permitted sender) client-ip=10.180.92.73; \r
+Authentication-Results: mr.google.com;\r
+ spf=pass (google.com: domain of pieter@praet.org\r
+ designates 10.180.92.73 as permitted sender)\r
+ smtp.mail=pieter@praet.org\r
+Received: from mr.google.com ([10.180.92.73])\r
+ by 10.180.92.73 with SMTP id ck9mr38246230wib.2.1329936352875 (num_hops\r
+ = 1); Wed, 22 Feb 2012 10:45:52 -0800 (PST)\r
+MIME-Version: 1.0\r
+Received: by 10.180.92.73 with SMTP id ck9mr31600121wib.2.1329936352742;\r
+ Wed, 22 Feb 2012 10:45:52 -0800 (PST)\r
+Received: from localhost ([109.131.181.26])\r
+ by mx.google.com with ESMTPS id ga1sm74840497wib.5.2012.02.22.10.45.52\r
+ (version=TLSv1/SSLv3 cipher=OTHER);\r
+ Wed, 22 Feb 2012 10:45:52 -0800 (PST)\r
+From: Pieter Praet <pieter@praet.org>\r
+To: Notmuch Mail <notmuch@notmuchmail.org>\r
+Subject: [PATCH v2 1/7] test: emacs: new tests "notmuch-show: {show,\r
+ hide} message headers"\r
+Date: Wed, 22 Feb 2012 19:43:28 +0100\r
+Message-Id: <1329936214-30959-1-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
+ ALoCoQmkzLCvLiLNWey9Nb/a9s+Oa9bVzHzYzG6L+jRvJKJhL8N27n0t0K8VzLgb5r4zaZsCJC7y\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: show message headers":\r
+ Setting `notmuch-message-headers-visible' to t causes all headers\r
+ defined in `notmuch-message-headers' to be shown.\r
+\r
+ - New subtest "notmuch-show: hide message headers":\r
+ Setting `notmuch-message-headers-visible' to nil causes all headers\r
+ defined in `notmuch-message-headers' to be hidden.\r
+ ("Subject:" may be an exception; See the use of `headers-start' in\r
+ `notmuch-show-insert-msg')\r
+\r
+ - New subtest "notmuch-show: hide message headers (w/ notmuch-show-toggle-headers)":\r
+ Setting `notmuch-message-headers-visible' to t causes all headers\r
+ defined in `notmuch-message-headers' to be shown, but they can be\r
+ hidden for the current message by running `notmuch-show-toggle-headers'.\r
+---\r
+ test/emacs | 25 ++++++++++++++++++++\r
+ .../notmuch-show-message-with-headers-hidden | 22 +++++++++++++++++\r
+ .../notmuch-show-message-with-headers-visible | 25 ++++++++++++++++++++\r
+ 3 files changed, 72 insertions(+), 0 deletions(-)\r
+ create mode 100644 test/emacs.expected-output/notmuch-show-message-with-headers-hidden\r
+ create mode 100644 test/emacs.expected-output/notmuch-show-message-with-headers-visible\r
+\r
+diff --git a/test/emacs b/test/emacs\r
+index b74cfa9..f9ea1c3 100755\r
+--- a/test/emacs\r
++++ b/test/emacs\r
+@@ -383,6 +383,31 @@ test_emacs '(notmuch-show "id:f35dbb950911171438k5df6eb56k77b6c0944e2e79ae@mail.\r
+ (test-visible-output)'\r
+ test_expect_equal_file OUTPUT $EXPECTED/notmuch-show-thread-with-hidden-messages\r
+ \r
++test_begin_subtest "notmuch-show: show message headers"\r
++test_emacs \\r
++ '(let ((notmuch-message-headers '\''("Subject" "To" "Cc" "Date"))\r
++ (notmuch-message-headers-visible t))\r
++ (notmuch-show "id:f35dbb950911171438k5df6eb56k77b6c0944e2e79ae@mail.gmail.com")\r
++ (test-visible-output))'\r
++test_expect_equal_file OUTPUT $EXPECTED/notmuch-show-message-with-headers-visible\r
++\r
++test_begin_subtest "notmuch-show: hide message headers"\r
++test_emacs \\r
++ '(let ((notmuch-message-headers '\''("Subject" "To" "Cc" "Date"))\r
++ (notmuch-message-headers-visible nil))\r
++ (notmuch-show "id:f35dbb950911171438k5df6eb56k77b6c0944e2e79ae@mail.gmail.com")\r
++ (test-visible-output))'\r
++test_expect_equal_file OUTPUT $EXPECTED/notmuch-show-message-with-headers-hidden\r
++\r
++test_begin_subtest "notmuch-show: hide message headers (w/ notmuch-show-toggle-headers)"\r
++test_emacs \\r
++ '(let ((notmuch-message-headers '\''("Subject" "To" "Cc" "Date"))\r
++ (notmuch-message-headers-visible t))\r
++ (notmuch-show "id:f35dbb950911171438k5df6eb56k77b6c0944e2e79ae@mail.gmail.com")\r
++ (notmuch-show-toggle-headers)\r
++ (test-visible-output))'\r
++test_expect_equal_file OUTPUT $EXPECTED/notmuch-show-message-with-headers-hidden\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-message-with-headers-hidden b/test/emacs.expected-output/notmuch-show-message-with-headers-hidden\r
+new file mode 100644\r
+index 0000000..9d7f91b\r
+--- /dev/null\r
++++ b/test/emacs.expected-output/notmuch-show-message-with-headers-hidden\r
+@@ -0,0 +1,22 @@\r
++Jan Janak <jan@ryngle.com> (2009-11-17) (inbox unread)\r
++Subject: [notmuch] What a great idea!\r
++ Jan Janak <jan@ryngle.com> (2009-11-17) (inbox)\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
+diff --git a/test/emacs.expected-output/notmuch-show-message-with-headers-visible b/test/emacs.expected-output/notmuch-show-message-with-headers-visible\r
+new file mode 100644\r
+index 0000000..8efbd60\r
+--- /dev/null\r
++++ b/test/emacs.expected-output/notmuch-show-message-with-headers-visible\r
+@@ -0,0 +1,25 @@\r
++Jan Janak <jan@ryngle.com> (2009-11-17) (inbox unread)\r
++Subject: [notmuch] What a great idea!\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
+-- \r
+1.7.8.1\r
+\r