Re: [PATCH v4 2/4] reply: Add a JSON reply format.
authorAdam Wolfe Gordon <awg+notmuch@xvx.ca>
Fri, 10 Feb 2012 04:27:29 +0000 (21:27 +1700)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:44:19 +0000 (09:44 -0800)
00/7066770be574b33ad3e402a1f26baaead79a26 [new file with mode: 0644]

diff --git a/00/7066770be574b33ad3e402a1f26baaead79a26 b/00/7066770be574b33ad3e402a1f26baaead79a26
new file mode 100644 (file)
index 0000000..2c0be57
--- /dev/null
@@ -0,0 +1,120 @@
+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 C4F9D431FB6\r
+       for <notmuch@notmuchmail.org>; Thu,  9 Feb 2012 20:27:31 -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 0YdkEIxHcFsB for <notmuch@notmuchmail.org>;\r
+       Thu,  9 Feb 2012 20:27:31 -0800 (PST)\r
+Received: from mail-lpp01m020-f181.google.com (mail-lpp01m020-f181.google.com\r
+       [209.85.217.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id DF2B2431FAE\r
+       for <notmuch@notmuchmail.org>; Thu,  9 Feb 2012 20:27:30 -0800 (PST)\r
+Received: by lbbgn5 with SMTP id gn5so1368423lbb.26\r
+       for <notmuch@notmuchmail.org>; Thu, 09 Feb 2012 20:27:29 -0800 (PST)\r
+MIME-Version: 1.0\r
+Received: by 10.152.123.68 with SMTP id ly4mr3052300lab.13.1328848049088; Thu,\r
+       09 Feb 2012 20:27:29 -0800 (PST)\r
+Sender: awg@xvx.ca\r
+Received: by 10.112.90.20 with HTTP; Thu, 9 Feb 2012 20:27:29 -0800 (PST)\r
+X-Originating-IP: [96.52.216.56]\r
+In-Reply-To: <87mx8sa2tj.fsf@gmail.com>\r
+References: <1326995217-27423-1-git-send-email-awg+notmuch@xvx.ca>\r
+       <1328746916-25447-1-git-send-email-awg+notmuch@xvx.ca>\r
+       <1328746916-25447-3-git-send-email-awg+notmuch@xvx.ca>\r
+       <87mx8sa2tj.fsf@gmail.com>\r
+Date: Thu, 9 Feb 2012 21:27:29 -0700\r
+X-Google-Sender-Auth: TIS98BnxoTlkJAolME_OyVN1q1Y\r
+Message-ID:\r
+ <CAMoJFUshAUAO6hnYWefXgdBdZe3qavgWokLC8du3VWGYDb9RUQ@mail.gmail.com>\r
+Subject: Re: [PATCH v4 2/4] reply: Add a JSON reply format.\r
+From: Adam Wolfe Gordon <awg+notmuch@xvx.ca>\r
+To: Dmitry Kurochkin <dmitry.kurochkin@gmail.com>\r
+Content-Type: text/plain; charset=ISO-8859-1\r
+Content-Transfer-Encoding: quoted-printable\r
+X-Gm-Message-State:\r
+ ALoCoQkH0/0VaDrio0eFWD9t/wbwLVVOO2lN1vLxwks4eduoP/qD+1u4OGG4KJ3bES8OxN1xwwsd\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: Fri, 10 Feb 2012 04:27:31 -0000\r
+\r
+Hi Dmitry,\r
+\r
+On Thu, Feb 9, 2012 at 00:22, Dmitry Kurochkin\r
+<dmitry.kurochkin@gmail.com> wrote:\r
+>> Reply now enforces that only one message is returned, as the semantics\r
+>> of replying to multiple messages are not wel-defined.\r
+>\r
+> s/wel/well/\r
+\r
+Oops! git filter-branch to the rescue :-).\r
+\r
+>> Show is modified such that --format=3Djson no longer implies\r
+>> --entire-thread, as MUAs will use --format=3Djson when constructing\r
+>> replies. The man page is updated to reflect this change.\r
+>\r
+> I did not look into details. =A0But I am surprised that user needs to cal=\r
+l\r
+> notmuch show --format=3Djson to make reply. =A0I would expect notmuch rep=\r
+ly\r
+> to provide all required info (except for bodies).\r
+\r
+I agree, it would be ideal to include the data from show --format=3Djson\r
+in the reply JSON. I started down the path of implementing this, but\r
+realized it requires either copying quite a bit of code from show or\r
+factoring it out, and both options felt kind of dirty. I'd like show\r
+and reply to share a function that produces the JSON-formatted body of\r
+a message, but it doesn't feel right to expose the entire JSON format\r
+and all the functions that go with it from notmuch-show.c and put the\r
+structure and all the prototypes in notmuch-client.h.\r
+\r
+Will Austin's show rewrite make this easier/cleaner? Or am I being too\r
+squeamish about moving code?\r
+\r
+> Anyway, I think you should put this change in a separate patch.\r
+\r
+Yeah, if I leave it as is it changes a default behavior, so a separate\r
+patch would probably be a good idea.\r
+\r
+> Also, we clearly need a NEWS entry for it and user-customizable Emacs\r
+> variable changes. =A0Though it can be done after this series is pushed, I\r
+> guess.\r
+\r
+I don't think there are any emacs customization changes here, unless\r
+we want to implement the notmuch mode config file that was discussed\r
+before to give message-citation-line-format and other things nice\r
+defaults. Or are you suggesting that there should be some new\r
+customization options? (One I can think of would be the list of\r
+preferred types for multipart/alternative display, which right now is\r
+hardcoded in notmuch-show.el.)\r
+\r
+> Thank you for this work, it is much appreciated.\r
+\r
+Thanks for taking the time to review these patches! I think as a\r
+result of everyone's reviews I've pushed the series toward what I\r
+envisioned/wanted in the first place, rather than the kinda kludgey\r
+thing I did initially.\r
+\r
+Amusingly, I've started a new job since I wrote the original patch and\r
+no longer receive much HTML-only email, but I like this patch series\r
+enough to see it through anyway :-).\r