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