[PATCH 2/3] test: emacs: toggle eliding of non-matching messages in `notmuch-show'
authorPieter Praet <pieter@praet.org>
Sun, 19 Feb 2012 20:56:29 +0000 (21:56 +0100)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:44:43 +0000 (09:44 -0800)
db/d418d945f5995d4350e68c8ca6d46a52b515e3 [new file with mode: 0644]

diff --git a/db/d418d945f5995d4350e68c8ca6d46a52b515e3 b/db/d418d945f5995d4350e68c8ca6d46a52b515e3
new file mode 100644 (file)
index 0000000..8b98b7c
--- /dev/null
@@ -0,0 +1,293 @@
+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 8D14A431FB6\r
+       for <notmuch@notmuchmail.org>; Sun, 19 Feb 2012 12:59:01 -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 T6UZdNSYPTl2 for <notmuch@notmuchmail.org>;\r
+       Sun, 19 Feb 2012 12:58:57 -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 CCD97431FC3\r
+       for <notmuch@notmuchmail.org>; Sun, 19 Feb 2012 12:58:50 -0800 (PST)\r
+Received: by mail-we0-f181.google.com with SMTP id p13so3520649wer.26\r
+       for <notmuch@notmuchmail.org>; Sun, 19 Feb 2012 12:58:50 -0800 (PST)\r
+Received-SPF: pass (google.com: domain of pieter@praet.org designates\r
+       10.180.99.65 as permitted sender) client-ip=10.180.99.65; \r
+Authentication-Results: mr.google.com;\r
+       spf=pass (google.com: domain of pieter@praet.org\r
+       designates 10.180.99.65 as permitted sender)\r
+       smtp.mail=pieter@praet.org\r
+Received: from mr.google.com ([10.180.99.65])\r
+       by 10.180.99.65 with SMTP id eo1mr13158444wib.13.1329685130602\r
+       (num_hops = 1); Sun, 19 Feb 2012 12:58:50 -0800 (PST)\r
+MIME-Version: 1.0\r
+Received: by 10.180.99.65 with SMTP id eo1mr11067902wib.13.1329685130510;\r
+       Sun, 19 Feb 2012 12:58:50 -0800 (PST)\r
+Received: from localhost (104.218-242-81.adsl-dyn.isp.belgacom.be.\r
+       [81.242.218.104])\r
+       by mx.google.com with ESMTPS id s8sm11454979wiz.8.2012.02.19.12.58.49\r
+       (version=TLSv1/SSLv3 cipher=OTHER);\r
+       Sun, 19 Feb 2012 12:58:50 -0800 (PST)\r
+From: Pieter Praet <pieter@praet.org>\r
+To: David Edmondson <dme@dme.org>\r
+Subject: [PATCH 2/3] test: emacs: toggle eliding of non-matching messages in\r
+       `notmuch-show'\r
+Date: Sun, 19 Feb 2012 21:56:29 +0100\r
+Message-Id: <1329684990-12504-3-git-send-email-pieter@praet.org>\r
+X-Mailer: git-send-email 1.7.8.1\r
+In-Reply-To: <1329684990-12504-1-git-send-email-pieter@praet.org>\r
+References: <1328688139-3865-1-git-send-email-dme@dme.org>\r
+       <1329684990-12504-1-git-send-email-pieter@praet.org>\r
+X-Gm-Message-State:\r
+ ALoCoQlM6VUbRDi+pif7OJY6t3odvsa3pPMcWsxk92HDyVpF93YXDm+GmQqcX5irNi/SjADRtrKy\r
+Cc: Notmuch Mail <notmuch@notmuchmail.org>\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, 19 Feb 2012 20:59:01 -0000\r
+\r
+See commits 44a544ed, 866ce8b1, 668b66ec.\r
+---\r
+ test/emacs                                         |   38 ++++++++++\r
+ .../notmuch-show-elide-non-matching-messages-off   |   79 ++++++++++++++++++++\r
+ .../notmuch-show-elide-non-matching-messages-on    |   75 +++++++++++++++++++\r
+ 3 files changed, 192 insertions(+), 0 deletions(-)\r
+ create mode 100644 test/emacs.expected-output/notmuch-show-elide-non-matching-messages-off\r
+ create mode 100644 test/emacs.expected-output/notmuch-show-elide-non-matching-messages-on\r
+\r
+diff --git a/test/emacs b/test/emacs\r
+index b207d20..320057a 100755\r
+--- a/test/emacs\r
++++ b/test/emacs\r
+@@ -553,5 +553,43 @@ test_emacs '(let ((notmuch-crypto-process-mime nil))\r
+       (test-visible-output))'\r
+ test_expect_equal_file OUTPUT $EXPECTED/notmuch-show-process-crypto-mime-parts-on\r
+ \r
++test_begin_subtest "notmuch-show: don't elide non-matching messages"\r
++test_emacs '(let ((notmuch-show-only-matching-messages nil))\r
++      (notmuch-search "from:lars@seas.harvard.edu and subject:\"Maildir storage\"")\r
++      (notmuch-test-wait)\r
++      (notmuch-search-show-thread)\r
++      (notmuch-test-wait)\r
++      (test-visible-output))'\r
++test_expect_equal_file OUTPUT $EXPECTED/notmuch-show-elide-non-matching-messages-off\r
++\r
++test_begin_subtest "notmuch-show: elide non-matching messages"\r
++test_emacs '(let ((notmuch-show-only-matching-messages t))\r
++      (notmuch-search "from:lars@seas.harvard.edu and subject:\"Maildir storage\"")\r
++      (notmuch-test-wait)\r
++      (notmuch-search-show-thread)\r
++      (notmuch-test-wait)\r
++      (test-visible-output))'\r
++test_expect_equal_file OUTPUT $EXPECTED/notmuch-show-elide-non-matching-messages-on\r
++\r
++test_begin_subtest "notmuch-show: elide non-matching messages (w/ notmuch-show-toggle-elide-non-matching)"\r
++test_emacs '(let ((notmuch-show-only-matching-messages nil))\r
++      (notmuch-search "from:lars@seas.harvard.edu and subject:\"Maildir storage\"")\r
++      (notmuch-test-wait)\r
++      (notmuch-search-show-thread)\r
++      (notmuch-test-wait)\r
++      (notmuch-show-toggle-elide-non-matching)\r
++      (test-visible-output))'\r
++test_expect_equal_file OUTPUT $EXPECTED/notmuch-show-elide-non-matching-messages-on\r
++\r
++test_begin_subtest "notmuch-show: elide non-matching messages (w/ prefix arg to notmuch-show)"\r
++test_emacs '(let ((notmuch-show-only-matching-messages nil))\r
++      (notmuch-search "from:lars@seas.harvard.edu and subject:\"Maildir storage\"")\r
++      (notmuch-test-wait)\r
++      (let ((current-prefix-arg t))\r
++        (notmuch-search-show-thread))\r
++      (notmuch-test-wait)\r
++      (test-visible-output))'\r
++test_expect_equal_file OUTPUT $EXPECTED/notmuch-show-elide-non-matching-messages-on\r
++\r
+ \r
+ test_done\r
+diff --git a/test/emacs.expected-output/notmuch-show-elide-non-matching-messages-off b/test/emacs.expected-output/notmuch-show-elide-non-matching-messages-off\r
+new file mode 100644\r
+index 0000000..b31fe62\r
+--- /dev/null\r
++++ b/test/emacs.expected-output/notmuch-show-elide-non-matching-messages-off\r
+@@ -0,0 +1,79 @@\r
++Lars Kellogg-Stedman <lars@seas.harvard.edu> (2009-11-17) (inbox signed)\r
++Subject: [notmuch] Working with Maildir storage?\r
++To: notmuch@notmuchmail.org\r
++Date: Tue, 17 Nov 2009 14:00:54 -0500\r
++\r
++[ multipart/mixed ]\r
++[ multipart/signed ]\r
++[ text/plain ]\r
++I saw the LWN article and decided to take a look at notmuch.  I'm\r
++currently using mutt and mairix to index and read a collection of\r
++Maildir mail folders (around 40,000 messages total).\r
++\r
++notmuch indexed the messages without complaint, but my attempt at\r
++searching bombed out. Running, for example:\r
++\r
++  notmuch search storage\r
++\r
++Resulted in 4604 lines of errors along the lines of:\r
++\r
++  Error opening\r
++  /home/lars/Mail/read-messages.2008/cur/1246413773.24928_27334.hostname,U=3026:2,S:\r
++  Too many open files\r
++\r
++I'm curious if this is expected behavior (i.e., notmuch does not work\r
++with Maildir) or if something else is going on.\r
++\r
++Cheers,\r
++\r
++[ 4-line signature. Click/Enter to show. ]\r
++[ application/pgp-signature ]\r
++[ text/plain ]\r
++[ 4-line signature. Click/Enter to show. ]\r
++ Mikhail Gusarov <dottedmag@dottedmag.net> (2009-11-17) (inbox signed unread)\r
++  Lars Kellogg-Stedman <lars@seas.harvard.edu> (2009-11-17) (inbox signed)\r
++  Subject: Re: [notmuch] Working with Maildir storage?\r
++  To: Mikhail Gusarov <dottedmag@dottedmag.net>\r
++  Cc: notmuch@notmuchmail.org\r
++  Date: Tue, 17 Nov 2009 15:33:01 -0500\r
++\r
++  [ multipart/mixed ]\r
++  [ multipart/signed ]\r
++  [ text/plain ]\r
++  > See the patch just posted here.\r
++\r
++  Is the list archived anywhere?  The obvious archives\r
++  (http://notmuchmail.org/pipermail/notmuch/) aren't available, and I\r
++  think I subscribed too late to get the patch (I only just saw the\r
++  discussion about it).\r
++\r
++  It doesn't look like the patch is in git yet.\r
++\r
++  -- Lars\r
++\r
++  [ 4-line signature. Click/Enter to show. ]\r
++  [ application/pgp-signature ]\r
++  [ text/plain ]\r
++  [ 4-line signature. Click/Enter to show. ]\r
++   Mikhail Gusarov <dottedmag@dottedmag.net> (2009-11-17) (inbox unread)\r
++   Keith Packard <keithp@keithp.com> (2009-11-17) (inbox unread)\r
++    Lars Kellogg-Stedman <lars@seas.harvard.edu> (2009-11-18) (inbox signed unread)\r
++    Subject: Re: [notmuch] Working with Maildir storage?\r
++    To: Keith Packard <keithp@keithp.com>\r
++    Cc: notmuch@notmuchmail.org\r
++    Date: Tue, 17 Nov 2009 19:50:40 -0500\r
++\r
++    [ multipart/mixed ]\r
++    [ multipart/signed ]\r
++    [ text/plain ]\r
++    > I've also pushed a slightly more complicated (and complete) fix to my\r
++    > private notmuch repository\r
++\r
++    The version of lib/messages.cc in your repo doesn't build because it's\r
++    missing "#include <stdint.h>" (for the uint32_t on line 466).\r
++\r
++    [ 4-line signature. Click/Enter to show. ]\r
++    [ application/pgp-signature ]\r
++    [ text/plain ]\r
++    [ 4-line signature. Click/Enter to show. ]\r
++ Carl Worth <cworth@cworth.org> (2009-11-18) (inbox unread)\r
+diff --git a/test/emacs.expected-output/notmuch-show-elide-non-matching-messages-on b/test/emacs.expected-output/notmuch-show-elide-non-matching-messages-on\r
+new file mode 100644\r
+index 0000000..bafb479\r
+--- /dev/null\r
++++ b/test/emacs.expected-output/notmuch-show-elide-non-matching-messages-on\r
+@@ -0,0 +1,75 @@\r
++Lars Kellogg-Stedman <lars@seas.harvard.edu> (2009-11-17) (inbox signed)\r
++Subject: [notmuch] Working with Maildir storage?\r
++To: notmuch@notmuchmail.org\r
++Date: Tue, 17 Nov 2009 14:00:54 -0500\r
++\r
++[ multipart/mixed ]\r
++[ multipart/signed ]\r
++[ text/plain ]\r
++I saw the LWN article and decided to take a look at notmuch.  I'm\r
++currently using mutt and mairix to index and read a collection of\r
++Maildir mail folders (around 40,000 messages total).\r
++\r
++notmuch indexed the messages without complaint, but my attempt at\r
++searching bombed out. Running, for example:\r
++\r
++  notmuch search storage\r
++\r
++Resulted in 4604 lines of errors along the lines of:\r
++\r
++  Error opening\r
++  /home/lars/Mail/read-messages.2008/cur/1246413773.24928_27334.hostname,U=3026:2,S:\r
++  Too many open files\r
++\r
++I'm curious if this is expected behavior (i.e., notmuch does not work\r
++with Maildir) or if something else is going on.\r
++\r
++Cheers,\r
++\r
++[ 4-line signature. Click/Enter to show. ]\r
++[ application/pgp-signature ]\r
++[ text/plain ]\r
++[ 4-line signature. Click/Enter to show. ]\r
++  Lars Kellogg-Stedman <lars@seas.harvard.edu> (2009-11-17) (inbox signed)\r
++  Subject: Re: [notmuch] Working with Maildir storage?\r
++  To: Mikhail Gusarov <dottedmag@dottedmag.net>\r
++  Cc: notmuch@notmuchmail.org\r
++  Date: Tue, 17 Nov 2009 15:33:01 -0500\r
++\r
++  [ multipart/mixed ]\r
++  [ multipart/signed ]\r
++  [ text/plain ]\r
++  > See the patch just posted here.\r
++\r
++  Is the list archived anywhere?  The obvious archives\r
++  (http://notmuchmail.org/pipermail/notmuch/) aren't available, and I\r
++  think I subscribed too late to get the patch (I only just saw the\r
++  discussion about it).\r
++\r
++  It doesn't look like the patch is in git yet.\r
++\r
++  -- Lars\r
++\r
++  [ 4-line signature. Click/Enter to show. ]\r
++  [ application/pgp-signature ]\r
++  [ text/plain ]\r
++  [ 4-line signature. Click/Enter to show. ]\r
++    Lars Kellogg-Stedman <lars@seas.harvard.edu> (2009-11-18) (inbox signed unread)\r
++    Subject: Re: [notmuch] Working with Maildir storage?\r
++    To: Keith Packard <keithp@keithp.com>\r
++    Cc: notmuch@notmuchmail.org\r
++    Date: Tue, 17 Nov 2009 19:50:40 -0500\r
++\r
++    [ multipart/mixed ]\r
++    [ multipart/signed ]\r
++    [ text/plain ]\r
++    > I've also pushed a slightly more complicated (and complete) fix to my\r
++    > private notmuch repository\r
++\r
++    The version of lib/messages.cc in your repo doesn't build because it's\r
++    missing "#include <stdint.h>" (for the uint32_t on line 466).\r
++\r
++    [ 4-line signature. Click/Enter to show. ]\r
++    [ application/pgp-signature ]\r
++    [ text/plain ]\r
++    [ 4-line signature. Click/Enter to show. ]\r
+-- \r
+1.7.8.1\r
+\r