Re: [PATCH 2/3] cli: all search mode to include msg-ids with JSON output
authorMark Walters <markwalters1009@gmail.com>
Thu, 22 Nov 2012 19:35:10 +0000 (19:35 +0000)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:50:48 +0000 (09:50 -0800)
8d/4f0dc761701b00a1a8034f01db669a9246f94f [new file with mode: 0644]

diff --git a/8d/4f0dc761701b00a1a8034f01db669a9246f94f b/8d/4f0dc761701b00a1a8034f01db669a9246f94f
new file mode 100644 (file)
index 0000000..f7a7d5a
--- /dev/null
@@ -0,0 +1,112 @@
+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 3DD0B431FBD\r
+       for <notmuch@notmuchmail.org>; Thu, 22 Nov 2012 11:35:14 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -1.098\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-1.098 tagged_above=-999 required=5\r
+       tests=[DKIM_ADSP_CUSTOM_MED=0.001, FREEMAIL_FROM=0.001,\r
+       NML_ADSP_CUSTOM_MED=1.2, RCVD_IN_DNSWL_MED=-2.3] 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 ADljbThKRzeS for <notmuch@notmuchmail.org>;\r
+       Thu, 22 Nov 2012 11:35:13 -0800 (PST)\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 65C97431FAF\r
+       for <notmuch@notmuchmail.org>; Thu, 22 Nov 2012 11:35:13 -0800 (PST)\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 1TbcYH-0000Lh-IO; Thu, 22 Nov 2012 19:35:09 +0000\r
+Received: from 93-97-24-31.zone5.bethere.co.uk ([93.97.24.31] 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 1TbcYH-0001eU-8C; Thu, 22 Nov 2012 19:35:09 +0000\r
+From: Mark Walters <markwalters1009@gmail.com>\r
+To: Jameson Graef Rollins <jrollins@finestructure.net>,\r
+ notmuch@notmuchmail.org\r
+Subject: Re: [PATCH 2/3] cli: all search mode to include msg-ids with JSON\r
+       output\r
+In-Reply-To: <87y5hty5q2.fsf@servo.finestructure.net>\r
+References: <1352487491-31512-1-git-send-email-markwalters1009@gmail.com>\r
+       <1352487491-31512-3-git-send-email-markwalters1009@gmail.com>\r
+       <87y5hty5q2.fsf@servo.finestructure.net>\r
+User-Agent: Notmuch/0.14+81~g9730584 (http://notmuchmail.org) Emacs/23.4.1\r
+       (x86_64-pc-linux-gnu)\r
+Date: Thu, 22 Nov 2012 19:35:10 +0000\r
+Message-ID: <87pq35jus1.fsf@qmul.ac.uk>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=us-ascii\r
+X-Sender-Host-Address: 93.97.24.31\r
+X-QM-SPAM-Info: Sender has good ham record.  :)\r
+X-QM-Body-MD5: d86b7759bc0c9809faaf24781ca6b835 (of first 20000 bytes)\r
+X-SpamAssassin-Score: -1.8\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.8 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.5 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: Thu, 22 Nov 2012 19:35:14 -0000\r
+\r
+\r
+Hi\r
+\r
+On Thu, 22 Nov 2012, Jameson Graef Rollins <jrollins@finestructure.net> wrote:\r
+> On Fri, Nov 09 2012, Mark Walters <markwalters1009@gmail.com> wrote:\r
+>> This adds a --output=with-ids option which gives similar output to the\r
+>> normal search summary output but with a list of message ids\r
+>> too. Currently this is not implemented for text format.\r
+>\r
+> Hey, Mark.  Very nit-picky comment here, but I'm not sure "with-ids" is\r
+> an appropriate name for an output type.  "with-ids" sounds like a\r
+> modifier, as opposed to a output type unto itself.\r
+\r
+Yes that is true: I am very happy for any suggestions. Perhaps\r
+summary-with-ids?\r
+\r
+> But I wonder if this separate output type is really necessary.  Can the\r
+> emacs interface just make two separate search calls to the binary when\r
+> constructing the buffer, one with --output=summary and one with\r
+> --output=messages?  Wouldn't that provide all the needed info?  I guess\r
+> there would still be a race condition, especially for really long search\r
+> results, but I wonder if the calls could actually be made in parallel at\r
+> the same time.  Maybe that would require more work.  Sorry, just\r
+> thinking out loud here...\r
+\r
+As you say this doesn't fully solve the race. But more importantly there\r
+are two races: one for * (apply tag change to all matching messages) and\r
+one for tagging singles threads. I don't see how this would help with\r
+the latter. In my use this is the worrying race: I archive a thread to\r
+say I have dealt with it but I may archive a reply which arrived after I\r
+populated the search buffer.\r
+\r
+Best wishes\r
+\r
+Mark\r
+\r