From: Tomi Ollila Date: Wed, 15 Feb 2012 15:00:27 +0000 (+0200) Subject: Re: [PATCH 0/8] Rewrite JSON show format X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=1422460ce510a6966724a94938e8686a008d66e1;p=notmuch-archives.git Re: [PATCH 0/8] Rewrite JSON show format --- diff --git a/1a/f932eb97ef6cccc64de28b4dc44d5c3fab12f9 b/1a/f932eb97ef6cccc64de28b4dc44d5c3fab12f9 new file mode 100644 index 000000000..88bdc1cde --- /dev/null +++ b/1a/f932eb97ef6cccc64de28b4dc44d5c3fab12f9 @@ -0,0 +1,113 @@ +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 646C8431E82 + for ; Wed, 15 Feb 2012 07:00:32 -0800 (PST) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: 0 +X-Spam-Level: +X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none] + 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 XL6W5wGFvjxA for ; + Wed, 15 Feb 2012 07:00:28 -0800 (PST) +Received: from guru.guru-group.fi (guru-group.fi [87.108.86.66]) + by olra.theworths.org (Postfix) with ESMTP id ED054431E62 + for ; Wed, 15 Feb 2012 07:00:27 -0800 (PST) +Received: by guru.guru-group.fi (Postfix, from userid 501) + id 9F4B968055; Wed, 15 Feb 2012 17:00:27 +0200 (EET) +From: Tomi Ollila +To: Austin Clements , notmuch@notmuchmail.org +Subject: Re: [PATCH 0/8] Rewrite JSON show format +In-Reply-To: <1329240823-7856-1-git-send-email-amdragon@mit.edu> +References: <1329240823-7856-1-git-send-email-amdragon@mit.edu> +User-Agent: Notmuch/0.11.1+198~g922c4d2 (http://notmuchmail.org) Emacs/23.3.1 + (x86_64-unknown-linux-gnu) +X-Face: HhBM'cA~ +MIME-Version: 1.0 +Content-Type: text/plain; charset=us-ascii +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: Wed, 15 Feb 2012 15:00:32 -0000 + +On Tue, 14 Feb 2012 12:33:35 -0500, Austin Clements wrote: +> The saga continues. As for the text format, this first shifts lots of +> code around without changing its semantics, then it dives in and +> simplifies a lot of things. Don't be put off by the number of +> patches; most of them are straightforward. +> +> As an added bonus, I documented (!) the JSON format for both show and +> search. + +I got 2 trailing whitespace "errors" when applied (schemata) patches. + +Emacs MUA works for me. + +Most json-related tests pass (for me), but I get this: + + FAIL notmuch-show for message with invalid From + --- emacs.10.expected 2012-02-15 14:28:48.000000000 +0000 + +++ emacs.10.output 2012-02-15 14:28:48.000000000 +0000 + @@ -1,4 +1,4 @@ + -"Invalid " (2001-01-05) (inbox) + +Invalid From (2001-01-05) (inbox) + +If this works for others then the problem is in my setup +(I have 8 other tests failing for various other reasons) + +The patch in id:"1329240823-7856-5-git-send-email-amdragon@mit.edu" +changes this -- the + line is almost like it was (without that ). +Maybe the reason is within gmime-2.4.20-1.el5.rf I'm having in this +machine -- have to try on another... + +...YES. other machine has (self-compiled) gmime 2.4.25 and there I got + +All 370 tests behaved as expected (2 expected failures). + +Code LGTM. + ++1 + +Tomi + +--8<----8<----8<----8<----8<----8<-- + +PS: I'm using code derived from dme's work to get patches. As it +was so convenient to get patched moved across machine I'll mention +it here -- maybe we get even better ways to do these things in the +future: + +I have in my notmuch emacs configuration file: + +(defun get-patches () + (interactive) + (let ((search-terms-list (notmuch-show-get-message-ids-for-open-messages))) + (with-temp-file "~/patch" + (call-process notmuch-command nil t nil "show" "--format=mbox" + (mapconcat 'identity search-terms-list " OR "))) + (with-temp-file "~/message-ids" + (insert (mapconcat 'identity search-terms-list "\n") "\n")))) + +This creates ~/patch which contains 'git am' -able mbox file and +~/message-ids for the message id's (if one has use for it). + +Now I just scp:d the patch file to another machine, git am'd it +and started testing. +