Re: Notmuch Pick
authorMark Walters <markwalters1009@gmail.com>
Tue, 19 Jun 2012 07:07:50 +0000 (08:07 +0100)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:47:43 +0000 (09:47 -0800)
34/f4e5307b8814f8bc712d4a6ef3364cb3d33129 [new file with mode: 0644]

diff --git a/34/f4e5307b8814f8bc712d4a6ef3364cb3d33129 b/34/f4e5307b8814f8bc712d4a6ef3364cb3d33129
new file mode 100644 (file)
index 0000000..ad2c6d9
--- /dev/null
@@ -0,0 +1,163 @@
+Return-Path: <m.walters@qmul.ac.uk>\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 B2B79431FB6\r
+       for <notmuch@notmuchmail.org>; Tue, 19 Jun 2012 00:07:56 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 1.401\r
+X-Spam-Level: *\r
+X-Spam-Status: No, score=1.401 tagged_above=-999 required=5\r
+       tests=[DKIM_ADSP_CUSTOM_MED=0.001, FREEMAIL_FROM=0.001,\r
+       FREEMAIL_REPLY=2.499, NML_ADSP_CUSTOM_MED=1.2, RCVD_IN_DNSWL_MED=-2.3]\r
+       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 Y0YHboPn1yKw for <notmuch@notmuchmail.org>;\r
+       Tue, 19 Jun 2012 00:07:56 -0700 (PDT)\r
+Received: from mail2.qmul.ac.uk (mail2.qmul.ac.uk [138.37.6.6])\r
+       (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id BA5FE431FAF\r
+       for <notmuch@notmuchmail.org>; Tue, 19 Jun 2012 00:07:55 -0700 (PDT)\r
+Received: from smtp.qmul.ac.uk ([138.37.6.40])\r
+       by mail2.qmul.ac.uk with esmtp (Exim 4.71)\r
+       (envelope-from <m.walters@qmul.ac.uk>)\r
+       id 1SgsXY-0003gN-Dp; Tue, 19 Jun 2012 08:07:54 +0100\r
+Received: from 94-192-233-223.zone6.bethere.co.uk ([94.192.233.223]\r
+       helo=localhost)\r
+       by smtp.qmul.ac.uk with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.69)\r
+       (envelope-from <m.walters@qmul.ac.uk>)\r
+       id 1SgsXY-0002F6-1s; Tue, 19 Jun 2012 08:07:52 +0100\r
+From: Mark Walters <markwalters1009@gmail.com>\r
+To: Jameson Graef Rollins <jrollins@finestructure.net>,\r
+ notmuch@notmuchmail.org\r
+Subject: Re: Notmuch Pick\r
+In-Reply-To: <87zk80ilt9.fsf@servo.finestructure.net>\r
+References: <87395ump0d.fsf@qmul.ac.uk>\r
+       <87zk80ilt9.fsf@servo.finestructure.net>\r
+User-Agent: Notmuch/0.13.2+63~g548a9bf (http://notmuchmail.org) Emacs/23.4.1\r
+       (x86_64-pc-linux-gnu)\r
+Date: Tue, 19 Jun 2012 08:07:50 +0100\r
+Message-ID: <87mx3zok3d.fsf@qmul.ac.uk>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=us-ascii\r
+X-Sender-Host-Address: 94.192.233.223\r
+X-QM-SPAM-Info: Sender has good ham record.  :)\r
+X-QM-Body-MD5: 550aeb014d2c6b6a585f11d6ab22dba5 (of first 20000 bytes)\r
+X-SpamAssassin-Score: -1.2\r
+X-SpamAssassin-SpamBar: -\r
+X-SpamAssassin-Report: The QM spam filters have analysed this message to\r
+       determine if it is\r
+       spam. We require at least 5.0 points to mark a message as spam.\r
+       This message scored -1.2 points.\r
+       Summary of the scoring: \r
+       * -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/,\r
+       *      medium trust\r
+       *      [138.37.6.40 listed in list.dnswl.org]\r
+       * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail\r
+       provider *      (markwalters1009[at]gmail.com)\r
+       * -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay\r
+       *      domain\r
+       *  1.0 FREEMAIL_REPLY From and body contain different freemails\r
+       *  0.1 AWL AWL: From: address is in the auto white-list\r
+X-QM-Scan-Virus: ClamAV says the message is clean\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: Tue, 19 Jun 2012 07:07:56 -0000\r
+\r
+\r
+On Mon, 18 Jun 2012, Jameson Graef Rollins <jrollins@finestructure.net> wrote:\r
+> On Sat, Jun 16 2012, Mark Walters <markwalters1009@gmail.com> wrote:\r
+>> Since I have had various requests for notmuch pick\r
+>> (id:"1329096015-8078-2-git-send-email-markwalters1009@gmail.com") so I\r
+>> have started a git repository at\r
+>> git://github.com/markwalters1009/notmuch.git\r
+>>\r
+>> The branch pick-6 is the current version. My intention is to start a new\r
+>> branch each time I rebase on to current master but this may change. (I\r
+>> suggest that people do not rely on a consistent history for this repository)\r
+>\r
+> Hey, Mark.  I took a look at this and I have a couple of comments:\r
+>\r
+> 726e11aff69e10499a9855e0ac2f15e518985c1f\r
+>     cli: notmuch-show with framing newlines between threads in JSON.\r
+>\r
+> This patch introduces a change in the json output format, but there is\r
+> no subsequent update of the test suite, so it's causing a lot of test\r
+> failures.  Obviously this needs to be fixed, but it would probably be\r
+> nice to include a couple of other tests for the pick output itself.  At\r
+> the very least a sanity test to check that it's working at all would be\r
+> sufficient initially.\r
+\r
+Hi \r
+\r
+As you say several tests do need fixing: I\r
+thought I would leave that until people said they were basically happy\r
+with the change. \r
+\r
+I am not sure about sanity tests for pick: how would that work while it\r
+lives in contrib? Obviously it would need some tests before coming in to\r
+proper mainline.\r
+\r
+> Would it also be useful to make this same change for the search out, for\r
+> consistency?  I notice the search output now uses newlines between all\r
+> fields, which should help for asynchronous processing, but it might be\r
+> nice to put newline separators between the initial and final brackets as\r
+> well.\r
+\r
+Right. \r
+\r
+> df97df62b70b884a1cd367360ed6ff7eda0e8af6\r
+>     cli: add --headers_only option to notmuch-show.c\r
+>\r
+> Your comment in this patch is very interesting:\r
+>\r
+>     This is used by notmuch-pick.el (although not needed) because it gives a\r
+>     speed-up of at least a factor of a two; moreover it reduces the memory\r
+>     usage in emacs hugely.\r
+>\r
+> The only difference between the regular show json output and the\r
+> --headers-only output, as far as I can tell, is the presence of the\r
+> content of text/plain parts if they exist in the message.  We previously\r
+> had a discussion about the show output not including any part bodies at\r
+> all, but we decided that the inclusion of text/plain bodies shouldn't\r
+> affect anything, so why not include them.  If they actually do, then I\r
+> argue we should just move to having show json not include any body parts\r
+> at all by default, and just have them be retrieved individually like we\r
+> do currently for non-text/plain parts.  This would make things cleaner,\r
+> and would get rid of the need to have this extra option, which really\r
+> doesn't produce a significantly different output.\r
+\r
+For one use of pick (displaying the structure of a single thread) this\r
+is not important (and the asynchronous stuff is irrelevant too). For\r
+another use of displaying the thread structure of a whole "folder" of\r
+messages it is important. For example the output of \r
+\r
+notmuch show tag:notmuch\r
+\r
+is about 70MB on my system, whereas with the --headers-only option this\r
+drops to about 7MB. Note Emacs uses substantially  more than this much\r
+memory to actually process the JSON, and on a low-powered laptop this\r
+is enough to cause a swap-storm.\r
+\r
+Your suggestion of just not including the text/plain is nice for\r
+notmuch-pick, and is very simple (a single line change). However, it\r
+does seem to slow the emacs show mode down noticeably on large threads\r
+(something like 2s to 4s on a thread with 180 messages) so I worry that\r
+this change might annoy people. What do you think?\r
+\r
+Many thanks for the comments!\r
+\r
+Mark\r