Re: [PATCH 1/2] cli: make --entire-thread=false work for format=json.
authorMark Walters <markwalters1009@gmail.com>
Tue, 10 Apr 2012 20:52:58 +0000 (21:52 +0100)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:46:14 +0000 (09:46 -0800)
52/ec7efacfdabab4beab51fa746913693d977934 [new file with mode: 0644]

diff --git a/52/ec7efacfdabab4beab51fa746913693d977934 b/52/ec7efacfdabab4beab51fa746913693d977934
new file mode 100644 (file)
index 0000000..85a4cd4
--- /dev/null
@@ -0,0 +1,122 @@
+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 E52C4431FAF\r
+       for <notmuch@notmuchmail.org>; Tue, 10 Apr 2012 13:52:46 -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 8J1HohkXfIO0 for <notmuch@notmuchmail.org>;\r
+       Tue, 10 Apr 2012 13:52:46 -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 17AEA431FAE\r
+       for <notmuch@notmuchmail.org>; Tue, 10 Apr 2012 13:52:46 -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 1SHi3N-0001fy-Pa; Tue, 10 Apr 2012 21:52:42 +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 1SHi3N-0005jd-EH; Tue, 10 Apr 2012 21:52:41 +0100\r
+From: Mark Walters <markwalters1009@gmail.com>\r
+To: Adam Wolfe Gordon <awg+notmuch@xvx.ca>\r
+Subject: Re: [PATCH 1/2] cli: make --entire-thread=false work for format=json.\r
+In-Reply-To:\r
+ <CAMoJFUuXmLQR+awJnPKg8ZJAKbHbPAmSrEUVoFj_=dZ76WiKzw@mail.gmail.com>\r
+References: <1334077496-9172-1-git-send-email-markwalters1009@gmail.com>\r
+       <1334077496-9172-2-git-send-email-markwalters1009@gmail.com>\r
+       <CAMoJFUuXmLQR+awJnPKg8ZJAKbHbPAmSrEUVoFj_=dZ76WiKzw@mail.gmail.com>\r
+User-Agent: Notmuch/0.12+101~g43fd4f1 (http://notmuchmail.org) Emacs/23.3.1\r
+       (x86_64-pc-linux-gnu)\r
+Date: Tue, 10 Apr 2012 21:52:58 +0100\r
+Message-ID: <87zkajux5h.fsf@qmul.ac.uk>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=utf-8\r
+Content-Transfer-Encoding: quoted-printable\r
+X-Sender-Host-Address: 94.192.233.223\r
+X-QM-SPAM-Info: Sender has good ham record.  :)\r
+X-QM-Body-MD5: 4061f153276e8083fe348e752afd52a1 (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
+Cc: notmuch@notmuchmail.org\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, 10 Apr 2012 20:52:47 -0000\r
+\r
+On Tue, 10 Apr 2012, Adam Wolfe Gordon <awg+notmuch@xvx.ca> wrote:\r
+> Hi Mark,\r
+>\r
+> This looks good to me, but I haven't tested it. It's probably worth\r
+> adding a test for the new functionality.\r
+\r
+Yes I agree. I could add a test to the json tests, or I could update the\r
+pair of test patches at\r
+id:"1332171061-27983-1-git-send-email-markwalters1009@gmail.com" as\r
+there do not seem to be any tests for --entire-thread or not for the\r
+other formats either. What do you think?\r
+\r
+> One style issue below, which is a matter of taste and I'll defer to\r
+> others if they disagree:\r
+>\r
+> On Tue, Apr 10, 2012 at 11:04, Mark Walters <markwalters1009@gmail.com> w=\r
+rote:\r
+>> @@ -895,10 +905,11 @@ show_messages (void *ctx,\r
+>> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if (status && !res)\r
+>> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0res =3D status;\r
+>> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0next_indent =3D indent + 1;\r
+>> + =C2=A0 =C2=A0 =C2=A0 } else\r
+>> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 status =3D show_null_message (forma=\r
+t);\r
+>\r
+> I accept, but don't particularly like, the notmuch style of omitting\r
+> braces where they aren't required. However, an else with a brace on\r
+> only one side just looks weird. If they're like this everywhere else\r
+> then I guess it's best to be consistent, but to me it's a lot more\r
+> readable as } else {.\r
+>\r
+> As I said above, I'll defer to others' judgement here, just thought it\r
+> was worth pointing out.\r
+\r
+Yes I will fix this in the next version (I recall Jani agreed with you\r
+so I will take that as preferred unless someone says otherwise.)\r
+\r
+thanks\r
+\r
+Mark\r