Re: [PATCH 0/8] Rewrite JSON show format
authorTomi Ollila <tomi.ollila@iki.fi>
Wed, 15 Feb 2012 15:00:27 +0000 (17:00 +0200)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:44:32 +0000 (09:44 -0800)
1a/f932eb97ef6cccc64de28b4dc44d5c3fab12f9 [new file with mode: 0644]

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