From 976f7faff4ba9dbc73425c03756c2e8a057a8c27 Mon Sep 17 00:00:00 2001 From: Mark Walters Date: Tue, 17 Apr 2012 18:45:29 +0100 Subject: [PATCH] Re: [PATCH 2/3] test: emacs: toggle eliding of non-matching messages in `notmuch-show' --- ca/8960e33402e7ab39c60d02c0ad1633ec9ec442 | 326 ++++++++++++++++++++++ 1 file changed, 326 insertions(+) create mode 100644 ca/8960e33402e7ab39c60d02c0ad1633ec9ec442 diff --git a/ca/8960e33402e7ab39c60d02c0ad1633ec9ec442 b/ca/8960e33402e7ab39c60d02c0ad1633ec9ec442 new file mode 100644 index 000000000..22bdd0ecb --- /dev/null +++ b/ca/8960e33402e7ab39c60d02c0ad1633ec9ec442 @@ -0,0 +1,326 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by olra.theworths.org (Postfix) with ESMTP id 6BDD2431FB6 + for ; Tue, 17 Apr 2012 10:45:24 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: 1.401 +X-Spam-Level: * +X-Spam-Status: No, score=1.401 tagged_above=-999 required=5 + tests=[DKIM_ADSP_CUSTOM_MED=0.001, FREEMAIL_FROM=0.001, + FREEMAIL_REPLY=2.499, NML_ADSP_CUSTOM_MED=1.2, RCVD_IN_DNSWL_MED=-2.3] + autolearn=disabled +Received: from olra.theworths.org ([127.0.0.1]) + by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id rn2IHlW+dRcC for ; + Tue, 17 Apr 2012 10:45:19 -0700 (PDT) +Received: from mail2.qmul.ac.uk (mail2.qmul.ac.uk [138.37.6.6]) + (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 1B6EF431FAE + for ; Tue, 17 Apr 2012 10:45:19 -0700 (PDT) +Received: from smtp.qmul.ac.uk ([138.37.6.40]) + by mail2.qmul.ac.uk with esmtp (Exim 4.71) + (envelope-from ) + id 1SKCSj-00005I-Mm; Tue, 17 Apr 2012 18:45:14 +0100 +Received: from 94-192-233-223.zone6.bethere.co.uk ([94.192.233.223] + helo=localhost) + by smtp.qmul.ac.uk with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.69) + (envelope-from ) + id 1SKCSj-0005dZ-4m; Tue, 17 Apr 2012 18:45:09 +0100 +From: Mark Walters +To: Pieter Praet , David Edmondson +Subject: Re: [PATCH 2/3] test: emacs: toggle eliding of non-matching messages + in `notmuch-show' +In-Reply-To: <1329684990-12504-3-git-send-email-pieter@praet.org> +References: <1328688139-3865-1-git-send-email-dme@dme.org> + <1329684990-12504-1-git-send-email-pieter@praet.org> + <1329684990-12504-3-git-send-email-pieter@praet.org> +User-Agent: Notmuch/0.12+110~gbc97b4a (http://notmuchmail.org) Emacs/23.3.1 + (x86_64-pc-linux-gnu) +Date: Tue, 17 Apr 2012 18:45:29 +0100 +Message-ID: <87k41e45hi.fsf@qmul.ac.uk> +MIME-Version: 1.0 +Content-Type: text/plain; charset=us-ascii +X-Sender-Host-Address: 94.192.233.223 +X-QM-SPAM-Info: Sender has good ham record. :) +X-QM-Body-MD5: c3b1035556ae15a6b6889a6fcf194c1a (of first 20000 bytes) +X-SpamAssassin-Score: -1.2 +X-SpamAssassin-SpamBar: - +X-SpamAssassin-Report: The QM spam filters have analysed this message to + determine if it is + spam. We require at least 5.0 points to mark a message as spam. + This message scored -1.2 points. + Summary of the scoring: + * -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, + * medium trust + * [138.37.6.40 listed in list.dnswl.org] + * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail + provider * (markwalters1009[at]gmail.com) + * -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay + * domain + * 1.0 FREEMAIL_REPLY From and body contain different freemails + * 0.1 AWL AWL: From: address is in the auto white-list +X-QM-Scan-Virus: ClamAV says the message is clean +Cc: Notmuch Mail +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.13 +Precedence: list +List-Id: "Use and development of the notmuch mail system." + +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +X-List-Received-Date: Tue, 17 Apr 2012 17:45:24 -0000 + +On Sun, 19 Feb 2012, Pieter Praet wrote: +> See commits 44a544ed, 866ce8b1, 668b66ec. +> --- +> test/emacs | 38 ++++++++++ +> .../notmuch-show-elide-non-matching-messages-off | 79 ++++++++++++++++++++ +> .../notmuch-show-elide-non-matching-messages-on | 75 +++++++++++++++++++ +> 3 files changed, 192 insertions(+), 0 deletions(-) +> create mode 100644 test/emacs.expected-output/notmuch-show-elide-non-matching-messages-off +> create mode 100644 test/emacs.expected-output/notmuch-show-elide-non-matching-messages-on + +This patch looks good to me and with other possible ways of implementing +elide [1] seems well worth having. + +It needs [1/3] which I think is ok but I have never used the crypto +stuff so wouldn't count this as a review of that patch. + +Patch [3/3] also looks fine. + +Best wishes + +Mark + +[1] id:"1334077496-9172-1-git-send-email-markwalters1009@gmail.com" +> +> diff --git a/test/emacs b/test/emacs +> index b207d20..320057a 100755 +> --- a/test/emacs +> +++ b/test/emacs +> @@ -553,5 +553,43 @@ test_emacs '(let ((notmuch-crypto-process-mime nil)) +> (test-visible-output))' +> test_expect_equal_file OUTPUT $EXPECTED/notmuch-show-process-crypto-mime-parts-on +> +> +test_begin_subtest "notmuch-show: don't elide non-matching messages" +> +test_emacs '(let ((notmuch-show-only-matching-messages nil)) +> + (notmuch-search "from:lars@seas.harvard.edu and subject:\"Maildir storage\"") +> + (notmuch-test-wait) +> + (notmuch-search-show-thread) +> + (notmuch-test-wait) +> + (test-visible-output))' +> +test_expect_equal_file OUTPUT $EXPECTED/notmuch-show-elide-non-matching-messages-off +> + +> +test_begin_subtest "notmuch-show: elide non-matching messages" +> +test_emacs '(let ((notmuch-show-only-matching-messages t)) +> + (notmuch-search "from:lars@seas.harvard.edu and subject:\"Maildir storage\"") +> + (notmuch-test-wait) +> + (notmuch-search-show-thread) +> + (notmuch-test-wait) +> + (test-visible-output))' +> +test_expect_equal_file OUTPUT $EXPECTED/notmuch-show-elide-non-matching-messages-on +> + +> +test_begin_subtest "notmuch-show: elide non-matching messages (w/ notmuch-show-toggle-elide-non-matching)" +> +test_emacs '(let ((notmuch-show-only-matching-messages nil)) +> + (notmuch-search "from:lars@seas.harvard.edu and subject:\"Maildir storage\"") +> + (notmuch-test-wait) +> + (notmuch-search-show-thread) +> + (notmuch-test-wait) +> + (notmuch-show-toggle-elide-non-matching) +> + (test-visible-output))' +> +test_expect_equal_file OUTPUT $EXPECTED/notmuch-show-elide-non-matching-messages-on +> + +> +test_begin_subtest "notmuch-show: elide non-matching messages (w/ prefix arg to notmuch-show)" +> +test_emacs '(let ((notmuch-show-only-matching-messages nil)) +> + (notmuch-search "from:lars@seas.harvard.edu and subject:\"Maildir storage\"") +> + (notmuch-test-wait) +> + (let ((current-prefix-arg t)) +> + (notmuch-search-show-thread)) +> + (notmuch-test-wait) +> + (test-visible-output))' +> +test_expect_equal_file OUTPUT $EXPECTED/notmuch-show-elide-non-matching-messages-on +> + +> +> test_done +> 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 +> new file mode 100644 +> index 0000000..b31fe62 +> --- /dev/null +> +++ b/test/emacs.expected-output/notmuch-show-elide-non-matching-messages-off +> @@ -0,0 +1,79 @@ +> +Lars Kellogg-Stedman (2009-11-17) (inbox signed) +> +Subject: [notmuch] Working with Maildir storage? +> +To: notmuch@notmuchmail.org +> +Date: Tue, 17 Nov 2009 14:00:54 -0500 +> + +> +[ multipart/mixed ] +> +[ multipart/signed ] +> +[ text/plain ] +> +I saw the LWN article and decided to take a look at notmuch. I'm +> +currently using mutt and mairix to index and read a collection of +> +Maildir mail folders (around 40,000 messages total). +> + +> +notmuch indexed the messages without complaint, but my attempt at +> +searching bombed out. Running, for example: +> + +> + notmuch search storage +> + +> +Resulted in 4604 lines of errors along the lines of: +> + +> + Error opening +> + /home/lars/Mail/read-messages.2008/cur/1246413773.24928_27334.hostname,U=3026:2,S: +> + Too many open files +> + +> +I'm curious if this is expected behavior (i.e., notmuch does not work +> +with Maildir) or if something else is going on. +> + +> +Cheers, +> + +> +[ 4-line signature. Click/Enter to show. ] +> +[ application/pgp-signature ] +> +[ text/plain ] +> +[ 4-line signature. Click/Enter to show. ] +> + Mikhail Gusarov (2009-11-17) (inbox signed unread) +> + Lars Kellogg-Stedman (2009-11-17) (inbox signed) +> + Subject: Re: [notmuch] Working with Maildir storage? +> + To: Mikhail Gusarov +> + Cc: notmuch@notmuchmail.org +> + Date: Tue, 17 Nov 2009 15:33:01 -0500 +> + +> + [ multipart/mixed ] +> + [ multipart/signed ] +> + [ text/plain ] +> + > See the patch just posted here. +> + +> + Is the list archived anywhere? The obvious archives +> + (http://notmuchmail.org/pipermail/notmuch/) aren't available, and I +> + think I subscribed too late to get the patch (I only just saw the +> + discussion about it). +> + +> + It doesn't look like the patch is in git yet. +> + +> + -- Lars +> + +> + [ 4-line signature. Click/Enter to show. ] +> + [ application/pgp-signature ] +> + [ text/plain ] +> + [ 4-line signature. Click/Enter to show. ] +> + Mikhail Gusarov (2009-11-17) (inbox unread) +> + Keith Packard (2009-11-17) (inbox unread) +> + Lars Kellogg-Stedman (2009-11-18) (inbox signed unread) +> + Subject: Re: [notmuch] Working with Maildir storage? +> + To: Keith Packard +> + Cc: notmuch@notmuchmail.org +> + Date: Tue, 17 Nov 2009 19:50:40 -0500 +> + +> + [ multipart/mixed ] +> + [ multipart/signed ] +> + [ text/plain ] +> + > I've also pushed a slightly more complicated (and complete) fix to my +> + > private notmuch repository +> + +> + The version of lib/messages.cc in your repo doesn't build because it's +> + missing "#include " (for the uint32_t on line 466). +> + +> + [ 4-line signature. Click/Enter to show. ] +> + [ application/pgp-signature ] +> + [ text/plain ] +> + [ 4-line signature. Click/Enter to show. ] +> + Carl Worth (2009-11-18) (inbox unread) +> 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 +> new file mode 100644 +> index 0000000..bafb479 +> --- /dev/null +> +++ b/test/emacs.expected-output/notmuch-show-elide-non-matching-messages-on +> @@ -0,0 +1,75 @@ +> +Lars Kellogg-Stedman (2009-11-17) (inbox signed) +> +Subject: [notmuch] Working with Maildir storage? +> +To: notmuch@notmuchmail.org +> +Date: Tue, 17 Nov 2009 14:00:54 -0500 +> + +> +[ multipart/mixed ] +> +[ multipart/signed ] +> +[ text/plain ] +> +I saw the LWN article and decided to take a look at notmuch. I'm +> +currently using mutt and mairix to index and read a collection of +> +Maildir mail folders (around 40,000 messages total). +> + +> +notmuch indexed the messages without complaint, but my attempt at +> +searching bombed out. Running, for example: +> + +> + notmuch search storage +> + +> +Resulted in 4604 lines of errors along the lines of: +> + +> + Error opening +> + /home/lars/Mail/read-messages.2008/cur/1246413773.24928_27334.hostname,U=3026:2,S: +> + Too many open files +> + +> +I'm curious if this is expected behavior (i.e., notmuch does not work +> +with Maildir) or if something else is going on. +> + +> +Cheers, +> + +> +[ 4-line signature. Click/Enter to show. ] +> +[ application/pgp-signature ] +> +[ text/plain ] +> +[ 4-line signature. Click/Enter to show. ] +> + Lars Kellogg-Stedman (2009-11-17) (inbox signed) +> + Subject: Re: [notmuch] Working with Maildir storage? +> + To: Mikhail Gusarov +> + Cc: notmuch@notmuchmail.org +> + Date: Tue, 17 Nov 2009 15:33:01 -0500 +> + +> + [ multipart/mixed ] +> + [ multipart/signed ] +> + [ text/plain ] +> + > See the patch just posted here. +> + +> + Is the list archived anywhere? The obvious archives +> + (http://notmuchmail.org/pipermail/notmuch/) aren't available, and I +> + think I subscribed too late to get the patch (I only just saw the +> + discussion about it). +> + +> + It doesn't look like the patch is in git yet. +> + +> + -- Lars +> + +> + [ 4-line signature. Click/Enter to show. ] +> + [ application/pgp-signature ] +> + [ text/plain ] +> + [ 4-line signature. Click/Enter to show. ] +> + Lars Kellogg-Stedman (2009-11-18) (inbox signed unread) +> + Subject: Re: [notmuch] Working with Maildir storage? +> + To: Keith Packard +> + Cc: notmuch@notmuchmail.org +> + Date: Tue, 17 Nov 2009 19:50:40 -0500 +> + +> + [ multipart/mixed ] +> + [ multipart/signed ] +> + [ text/plain ] +> + > I've also pushed a slightly more complicated (and complete) fix to my +> + > private notmuch repository +> + +> + The version of lib/messages.cc in your repo doesn't build because it's +> + missing "#include " (for the uint32_t on line 466). +> + +> + [ 4-line signature. Click/Enter to show. ] +> + [ application/pgp-signature ] +> + [ text/plain ] +> + [ 4-line signature. Click/Enter to show. ] +> -- +> 1.7.8.1 +> +> _______________________________________________ +> notmuch mailing list +> notmuch@notmuchmail.org +> http://notmuchmail.org/mailman/listinfo/notmuch -- 2.26.2