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 85669431FD0 for ; Mon, 18 Jul 2011 15:29:16 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.799 X-Spam-Level: X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] 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 WglAhcENfP+5 for ; Mon, 18 Jul 2011 15:29:14 -0700 (PDT) Received: from mail-fx0-f46.google.com (mail-fx0-f46.google.com [209.85.161.46]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id AE9B9429E2D for ; Mon, 18 Jul 2011 15:29:13 -0700 (PDT) Received: by mail-fx0-f46.google.com with SMTP id 19so7015353fxh.19 for ; Mon, 18 Jul 2011 15:29:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=WTJITMEhQ9FeWHW3twuwGJBbDfzMsMlQncu6Y0VWY4k=; b=pv9lHuritnmH33tKBay5DyWJ4ojMV4ImmxN+4x/8FGMmGLQodiF1r6iLnv/XLYy4Xk UoBPCTWns2LmIeASCJZK1utVrfbe+fQCKjHxM6zEdu1EIYZYRhq3KB8slCg7ECe9CHmg Rt93gL/ITtYbcq4hr28Z9qgV6rIXIX9nOJeaA= Received: by 10.223.144.140 with SMTP id z12mr10884507fau.147.1311028153261; Mon, 18 Jul 2011 15:29:13 -0700 (PDT) Received: from localhorst.example.com (brln-4d0cb676.pool.mediaWays.net [77.12.182.118]) by mx.google.com with ESMTPS id 9sm3227919far.13.2011.07.18.15.29.12 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 18 Jul 2011 15:29:12 -0700 (PDT) Received: by localhorst.example.com (Postfix, from userid 501) id 58C534720602; Tue, 19 Jul 2011 00:29:11 +0200 (CEST) From: Felix Geller To: notmuch@notmuchmail.org Subject: [PATCH 1/2] Emacs: Test for turning off indentation of messages in threads Date: Tue, 19 Jul 2011 00:28:38 +0200 Message-Id: <1311028119-50637-2-git-send-email-fgeller@gmail.com> X-Mailer: git-send-email 1.7.6 In-Reply-To: <1311028119-50637-1-git-send-email-fgeller@gmail.com> References: <87vcuz2yga.fsf@servo.factory.finestructure.net> <1311028119-50637-1-git-send-email-fgeller@gmail.com> 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: Mon, 18 Jul 2011 22:29:16 -0000 In Emacs, notmuch indents messages according to their thread depth. This leads to unused space and sometimes strange formatting of paragraphs with long lines. Therefore I would like to turn it off and have the message thread look more like a conversation, as on GMail for example. This commit contains a test for such functionality. It tests notmuch-show for a message thread without the indentation to indicate thread depth of messages. --- test/emacs | 7 + ...show-thread-maildir-storage-without-indentation | 215 ++++++++++++++++++++ 2 files changed, 222 insertions(+), 0 deletions(-) create mode 100644 test/emacs.expected-output/notmuch-show-thread-maildir-storage-without-indentation diff --git a/test/emacs b/test/emacs index 53f455a..c65d6d8 100755 --- a/test/emacs +++ b/test/emacs @@ -55,6 +55,13 @@ test_emacs "(notmuch-show \"$maildir_storage_thread\") (test-output)" test_expect_equal_file OUTPUT $EXPECTED/notmuch-show-thread-maildir-storage +test_begin_subtest "Basic notmuch-show view in emacs without indentation" +maildir_storage_thread=$(notmuch search --output=threads id:20091117190054.GU3165@dottiness.seas.harvard.edu) +test_emacs "(let ((notmuch-show-indent-messages-in-thread nil)) + (notmuch-show \"$maildir_storage_thread\") + (test-output))" +test_expect_equal_file OUTPUT $EXPECTED/notmuch-show-thread-maildir-storage-without-indentation + test_begin_subtest "notmuch-show for message with invalid From" add_message "[subject]=\"message-with-invalid-from\"" \ "[from]=\"\\\"Invalid \\\" From\\\" \"" diff --git a/test/emacs.expected-output/notmuch-show-thread-maildir-storage-without-indentation b/test/emacs.expected-output/notmuch-show-thread-maildir-storage-without-indentation new file mode 100644 index 0000000..00bd006 --- /dev/null +++ b/test/emacs.expected-output/notmuch-show-thread-maildir-storage-without-indentation @@ -0,0 +1,215 @@ +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, + +[ 5-line signature. Click/Enter to show. ] +-- +Lars Kellogg-Stedman +Senior Technologist, Computing and Information Technology +Harvard University School of Engineering and Applied Sciences + +[ application/pgp-signature ] +[ text/plain ] +[ 4-line signature. Click/Enter to show. ] +_______________________________________________ +notmuch mailing list +notmuch@notmuchmail.org +http://notmuchmail.org/mailman/listinfo/notmuch +Mikhail Gusarov (2009-11-17) (inbox signed unread) +Subject: Re: [notmuch] Working with Maildir storage? +To: notmuch@notmuchmail.org +Date: Wed, 18 Nov 2009 01:02:38 +0600 + +[ multipart/mixed ] +[ multipart/signed ] +[ text/plain ] + +Twas brillig at 14:00:54 17.11.2009 UTC-05 when lars@seas.harvard.edu did gyre and gimble: + + LK> Resulted in 4604 lines of errors along the lines of: + + LK> Error opening + LK> /home/lars/Mail/read-messages.2008/cur/1246413773.24928_27334.hostname,U=3026:2,S: + LK> Too many open files + +See the patch just posted here. + +[ 2-line signature. Click/Enter to show. ] +-- + http://fossarchy.blogspot.com/ +[ application/pgp-signature ] +[ text/plain ] +[ 4-line signature. Click/Enter to show. ] +_______________________________________________ +notmuch mailing list +notmuch@notmuchmail.org +http://notmuchmail.org/mailman/listinfo/notmuch +Lars Kellogg-Stedman (2009-11-17) (inbox signed unread) +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 + +[ 5-line signature. Click/Enter to show. ] +-- +Lars Kellogg-Stedman +Senior Technologist, Computing and Information Technology +Harvard University School of Engineering and Applied Sciences + +[ application/pgp-signature ] +[ text/plain ] +[ 4-line signature. Click/Enter to show. ] +_______________________________________________ +notmuch mailing list +notmuch@notmuchmail.org +http://notmuchmail.org/mailman/listinfo/notmuch +Mikhail Gusarov (2009-11-17) (inbox unread) +Subject: [notmuch] Working with Maildir storage? +To: notmuch@notmuchmail.org +Date: Wed, 18 Nov 2009 02:50:48 +0600 + + +Twas brillig at 15:33:01 17.11.2009 UTC-05 when lars at seas.harvard.edu did gyre and gimble: + + LK> Is the list archived anywhere? The obvious archives + LK> (http://notmuchmail.org/pipermail/notmuch/) aren't available, and I + LK> think I subscribed too late to get the patch (I only just saw the + LK> discussion about it). + + LK> It doesn't look like the patch is in git yet. + +Just has been pushed + +[ 10-line signature. Click/Enter to show. ] +-- + http://fossarchy.blogspot.com/ +-------------- next part -------------- +A non-text attachment was scrubbed... +Name: not available +Type: application/pgp-signature +Size: 834 bytes +Desc: not available +URL: + +Keith Packard (2009-11-17) (inbox unread) +Subject: [notmuch] Working with Maildir storage? +To: notmuch@notmuchmail.org +Date: Tue, 17 Nov 2009 13:24:13 -0800 + +On Tue, 17 Nov 2009 15:33:01 -0500, Lars Kellogg-Stedman wrote: +> > See the patch just posted here. + +I've also pushed a slightly more complicated (and complete) fix to my +private notmuch repository + +git://keithp.com/git/notmuch + +> Is the list archived anywhere? + +Oops. Looks like Carl's mail server is broken. He's traveling to +Barcelona today and so it won't get fixed for a while. + +Thanks to everyone for trying out notmuch! + +-keith + +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). + +[ 5-line signature. Click/Enter to show. ] +-- +Lars Kellogg-Stedman +Senior Technologist, Computing and Information Technology +Harvard University School of Engineering and Applied Sciences + +[ application/pgp-signature ] +[ text/plain ] +[ 4-line signature. Click/Enter to show. ] +_______________________________________________ +notmuch mailing list +notmuch@notmuchmail.org +http://notmuchmail.org/mailman/listinfo/notmuch +Carl Worth (2009-11-18) (inbox unread) +Subject: [notmuch] Working with Maildir storage? +To: notmuch@notmuchmail.org +Date: Wed, 18 Nov 2009 02:08:10 -0800 + +On Tue, 17 Nov 2009 14:00:54 -0500, Lars Kellogg-Stedman wrote: +> 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). + +Welcome, Lars! + +I hadn't even seen that Keith's blog post had been picked up by lwn.net. +That's very interesting. So, thanks for coming and trying out notmuch. + +> Error opening +> /home/lars/Mail/read-messages.2008/cur/1246413773.24928_27334.hostname,U=3026:2,S: +> Too many open files + +Sadly, the lwn article coincided with me having just introduced this +bug, and then getting on a Trans-Atlantic flight. So I fixed the bug +fairly quickly, but there was quite a bit of latency before I could push +the fix out. It should be fixed now. + +> I'm curious if this is expected behavior (i.e., notmuch does not work +> with Maildir) or if something else is going on. + +Notmuch works just fine with maildir---it's one of the things that it +likes the best. + +Happy hacking, + +-Carl + -- 1.7.6