Re: [PATCH v3 2/5] reply: Add a JSON reply format.
authorAdam Wolfe Gordon <awg+notmuch@xvx.ca>
Mon, 6 Feb 2012 06:27:14 +0000 (23:27 +1700)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:44:10 +0000 (09:44 -0800)
80/daf64d4e0e92a66bde45a150df6e20aec79c84 [new file with mode: 0644]

diff --git a/80/daf64d4e0e92a66bde45a150df6e20aec79c84 b/80/daf64d4e0e92a66bde45a150df6e20aec79c84
new file mode 100644 (file)
index 0000000..3c1e4a6
--- /dev/null
@@ -0,0 +1,80 @@
+Return-Path: <awg@xvx.ca>\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 DB9D4431FAF\r
+       for <notmuch@notmuchmail.org>; Sun,  5 Feb 2012 22:27:18 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.7\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
+       tests=[RCVD_IN_DNSWL_LOW=-0.7] 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 x90mRUWQFEOM for <notmuch@notmuchmail.org>;\r
+       Sun,  5 Feb 2012 22:27:18 -0800 (PST)\r
+Received: from mail-bk0-f53.google.com (mail-bk0-f53.google.com\r
+       [209.85.214.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id 0AACD431FAE\r
+       for <notmuch@notmuchmail.org>; Sun,  5 Feb 2012 22:27:17 -0800 (PST)\r
+Received: by bke11 with SMTP id 11so5168695bke.26\r
+       for <notmuch@notmuchmail.org>; Sun, 05 Feb 2012 22:27:15 -0800 (PST)\r
+MIME-Version: 1.0\r
+Received: by 10.204.130.89 with SMTP id r25mr7568699bks.49.1328509635078; Sun,\r
+       05 Feb 2012 22:27:15 -0800 (PST)\r
+Sender: awg@xvx.ca\r
+Received: by 10.204.104.13 with HTTP; Sun, 5 Feb 2012 22:27:14 -0800 (PST)\r
+X-Originating-IP: [96.52.216.56]\r
+In-Reply-To: <20120206034413.GO10898@mit.edu>\r
+References: <1326995217-27423-1-git-send-email-awg+notmuch@xvx.ca>\r
+       <1326995217-27423-3-git-send-email-awg+notmuch@xvx.ca>\r
+       <20120206034413.GO10898@mit.edu>\r
+Date: Sun, 5 Feb 2012 23:27:14 -0700\r
+X-Google-Sender-Auth: nq553jjXy9Js6O6Y7CcBKxcFcq8\r
+Message-ID:\r
+ <CAMoJFUtw=HD7gPKvuYSO3OhZ97kaMEroea6UmkQwYWMBc8WS_A@mail.gmail.com>\r
+Subject: Re: [PATCH v3 2/5] reply: Add a JSON reply format.\r
+From: Adam Wolfe Gordon <awg+notmuch@xvx.ca>\r
+To: Austin Clements <amdragon@mit.edu>\r
+Content-Type: text/plain; charset=ISO-8859-1\r
+Content-Transfer-Encoding: quoted-printable\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: Mon, 06 Feb 2012 06:27:19 -0000\r
+\r
+On Sun, Feb 5, 2012 at 20:44, Austin Clements <amdragon@mit.edu> wrote:\r
+> Sorry for coming late to the party. =A0I really like this idea, but it\r
+> seems like your implementation is duplicating a lot of the work of\r
+> notmuch show. =A0This makes me wonder if it would be better to return\r
+> reply header information in the JSON (which is definitely the way to\r
+> go) but to fetch the part body from the UI via show (and maybe reuse\r
+> some of the show-mode logic, if it makes sense to do so). =A0If this has\r
+> already been discussed, just point me at the thread and I'll catch\r
+> myself up.\r
+\r
+Thanks for taking a look. Dmitry noted on IRC that inlining the HTML\r
+in JSON could cause issues with non-UTF8 character sets. Right now I'm\r
+working on essentially what you've suggested - having the CLI produce\r
+only headers, and then using show to get the quotable body.\r
+\r
+Something else that was mentioned on IRC is using some of the notmuch\r
+show logic to produce the show JSON format as part of reply. I looked\r
+into this, but it would take some serious refactoring (to make the\r
+show JSON stuff accessible to reply), and since emacs will need to end\r
+up calling show anyway, I'm not sure it's worth it. I do like the idea\r
+of different CLI commands being able to produce standardized formats\r
+through some shared interface, I'm just not sure it's necessary here,\r
+and not sure what the interface should look like.\r