[PATCH 1/2] Emacs: Test for turning off indentation of messages in threads
authorFelix Geller <fgeller@gmail.com>
Mon, 18 Jul 2011 22:28:38 +0000 (00:28 +0200)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:39:10 +0000 (09:39 -0800)
5b/27e500e661a6ad8b0005dd638ede4139c5437f [new file with mode: 0644]

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