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 E52C4431FAF for ; Tue, 10 Apr 2012 13:52:46 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: 1.401 X-Spam-Level: * X-Spam-Status: No, score=1.401 tagged_above=-999 required=5 tests=[DKIM_ADSP_CUSTOM_MED=0.001, FREEMAIL_FROM=0.001, FREEMAIL_REPLY=2.499, 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 8J1HohkXfIO0 for ; Tue, 10 Apr 2012 13:52:46 -0700 (PDT) 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 17AEA431FAE for ; Tue, 10 Apr 2012 13:52:46 -0700 (PDT) Received: from smtp.qmul.ac.uk ([138.37.6.40]) by mail2.qmul.ac.uk with esmtp (Exim 4.71) (envelope-from ) id 1SHi3N-0001fy-Pa; Tue, 10 Apr 2012 21:52:42 +0100 Received: from 94-192-233-223.zone6.bethere.co.uk ([94.192.233.223] helo=localhost) by smtp.qmul.ac.uk with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.69) (envelope-from ) id 1SHi3N-0005jd-EH; Tue, 10 Apr 2012 21:52:41 +0100 From: Mark Walters To: Adam Wolfe Gordon Subject: Re: [PATCH 1/2] cli: make --entire-thread=false work for format=json. In-Reply-To: References: <1334077496-9172-1-git-send-email-markwalters1009@gmail.com> <1334077496-9172-2-git-send-email-markwalters1009@gmail.com> User-Agent: Notmuch/0.12+101~g43fd4f1 (http://notmuchmail.org) Emacs/23.3.1 (x86_64-pc-linux-gnu) Date: Tue, 10 Apr 2012 21:52:58 +0100 Message-ID: <87zkajux5h.fsf@qmul.ac.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Sender-Host-Address: 94.192.233.223 X-QM-SPAM-Info: Sender has good ham record. :) X-QM-Body-MD5: 4061f153276e8083fe348e752afd52a1 (of first 20000 bytes) X-SpamAssassin-Score: -1.2 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.2 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.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay * domain * 1.0 FREEMAIL_REPLY From and body contain different freemails * 0.1 AWL AWL: From: address is in the auto white-list X-QM-Scan-Virus: ClamAV says the message is clean Cc: notmuch@notmuchmail.org 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: Tue, 10 Apr 2012 20:52:47 -0000 On Tue, 10 Apr 2012, Adam Wolfe Gordon wrote: > Hi Mark, > > This looks good to me, but I haven't tested it. It's probably worth > adding a test for the new functionality. Yes I agree. I could add a test to the json tests, or I could update the pair of test patches at id:"1332171061-27983-1-git-send-email-markwalters1009@gmail.com" as there do not seem to be any tests for --entire-thread or not for the other formats either. What do you think? > One style issue below, which is a matter of taste and I'll defer to > others if they disagree: > > On Tue, Apr 10, 2012 at 11:04, Mark Walters w= rote: >> @@ -895,10 +905,11 @@ show_messages (void *ctx, >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if (status && !res) >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0res =3D status; >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0next_indent =3D indent + 1; >> + =C2=A0 =C2=A0 =C2=A0 } else >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 status =3D show_null_message (forma= t); > > I accept, but don't particularly like, the notmuch style of omitting > braces where they aren't required. However, an else with a brace on > only one side just looks weird. If they're like this everywhere else > then I guess it's best to be consistent, but to me it's a lot more > readable as } else {. > > As I said above, I'll defer to others' judgement here, just thought it > was worth pointing out. Yes I will fix this in the next version (I recall Jani agreed with you so I will take that as preferred unless someone says otherwise.) thanks Mark