Re: [PATCH v3 2/5] reply: Add a JSON reply format.
authorDmitry Kurochkin <dmitry.kurochkin@gmail.com>
Sun, 5 Feb 2012 19:50:54 +0000 (23:50 +0400)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:44:09 +0000 (09:44 -0800)
37/1fabe97d48105bdd7c7305acc514b6b3310111 [new file with mode: 0644]

diff --git a/37/1fabe97d48105bdd7c7305acc514b6b3310111 b/37/1fabe97d48105bdd7c7305acc514b6b3310111
new file mode 100644 (file)
index 0000000..a53f622
--- /dev/null
@@ -0,0 +1,134 @@
+Return-Path: <dmitry.kurochkin@gmail.com>\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 087BB431FAF\r
+       for <notmuch@notmuchmail.org>; Sun,  5 Feb 2012 11:52:13 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.799\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5\r
+       tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
+       FREEMAIL_FROM=0.001, 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 5198o+dzrGDR for <notmuch@notmuchmail.org>;\r
+       Sun,  5 Feb 2012 11:52:12 -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 21E3C431FAE\r
+       for <notmuch@notmuchmail.org>; Sun,  5 Feb 2012 11:52:11 -0800 (PST)\r
+Received: by bke11 with SMTP id 11so4925941bke.26\r
+       for <notmuch@notmuchmail.org>; Sun, 05 Feb 2012 11:52:10 -0800 (PST)\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;\r
+       h=from:to:cc:subject:in-reply-to:references:user-agent:date\r
+       :message-id:mime-version:content-type:content-transfer-encoding;\r
+       bh=ngOciv8MFJyyqKfFxzeWpOEXD1iwrXi4HNeQo6Dj1/g=;\r
+       b=muewf+844rg21ojXS+qFy8I/t4w38rB0xXypTgY99A3ih+801aIq5TpR/EB1JkZyoc\r
+       K1erBZmPFln7/EqkGeCrzMFe5LlN7SRh3295PWIjPyipIS9RwB5s/Kc9Q7FJ25MiDl4m\r
+       XNzAFcpMa1s1Ex7IGPmbH7Ozb4Zc+K7vfPuM8=\r
+Received: by 10.204.151.77 with SMTP id b13mr7340295bkw.57.1328471530655;\r
+       Sun, 05 Feb 2012 11:52:10 -0800 (PST)\r
+Received: from localhost ([91.144.186.21])\r
+       by mx.google.com with ESMTPS id 20sm38023985bkr.0.2012.02.05.11.52.09\r
+       (version=TLSv1/SSLv3 cipher=OTHER);\r
+       Sun, 05 Feb 2012 11:52:10 -0800 (PST)\r
+From: Dmitry Kurochkin <dmitry.kurochkin@gmail.com>\r
+To: Adam Wolfe Gordon <awg+notmuch@xvx.ca>,\r
+       Mark Walters <markwalters1009@gmail.com>\r
+Subject: Re: [PATCH v3 2/5] reply: Add a JSON reply format.\r
+In-Reply-To:\r
+ <CAMoJFUusrzG9GcAwrbK0iNDaUOCVsc=e-i-n0tEcSOSF4XBn0Q@mail.gmail.com>\r
+References: <1326995217-27423-1-git-send-email-awg+notmuch@xvx.ca>\r
+       <1326995217-27423-3-git-send-email-awg+notmuch@xvx.ca>\r
+       <87mx8xpki3.fsf@qmul.ac.uk>\r
+       <CAMoJFUusrzG9GcAwrbK0iNDaUOCVsc=e-i-n0tEcSOSF4XBn0Q@mail.gmail.com>\r
+User-Agent: Notmuch/0.11+139~gd9b7cab (http://notmuchmail.org) Emacs/23.3.1\r
+       (x86_64-pc-linux-gnu)\r
+Date: Sun, 05 Feb 2012 23:50:54 +0400\r
+Message-ID: <87aa4xys81.fsf@gmail.com>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=utf-8\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: Sun, 05 Feb 2012 19:52:13 -0000\r
+\r
+On Sun, 5 Feb 2012 12:42:12 -0700, Adam Wolfe Gordon <awg+notmuch@xvx.ca> w=\r
+rote:\r
+> Thanks for the review. The style nits are things I missed in my\r
+> previous cleanup, so thanks for pointing them out. I should probably\r
+> run uncrustify and see if it complains about anything else.\r
+>=20\r
+> The other points are definitely up for discussion, and some are areas\r
+> where I was unsure to start with. Discussion inline:\r
+>=20\r
+> On Sun, Feb 5, 2012 at 04:50, Mark Walters <markwalters1009@gmail.com> wr=\r
+ote:\r
+> >> + =C2=A0 =C2=A0/* We only care about inline text parts for reply purpo=\r
+ses */\r
+> >> + =C2=A0 =C2=A0if (reply_check_part_type (part, "text", "*", GMIME_DIS=\r
+POSITION_INLINE)) {\r
+> >\r
+> > This seems to be different from the logic in the text output: I think\r
+> > that inlines all text/* regardless of disposition. I think the JSON\r
+> > output should include at least as much as the text output as it is easy\r
+> > for the caller to discard parts.\r
+>=20\r
+> Indeed, the text output includes all text/* parts except for\r
+> text/html, regardless of disposition. My thought was that it doesn't\r
+> really make sense to quote an attachment, or at least it's not the\r
+> behavior I would expect. But, perhaps it makes more sense to include\r
+> all the text parts, with their dispositions, and let the MUA decide\r
+> what it wants to quote. If anyone has thoughts on this I'm happy to\r
+> hear them.\r
+>=20\r
+> > Does wrapper need to a free/unref somewhere?\r
+>=20\r
+> The text format doesn't free or unref wrapper, so I followed its\r
+> example. But, I'm not a gmime expert, and I agree intuitively that it\r
+> should be freed somehow. Can anyone enlighten me?\r
+>=20\r
+> > If replying to multiple messages (such as a whole thread) you get\r
+> > multiple sets of "new headers". I think that probably is not what is\r
+> > wanted but its still better than the weird things the text version\r
+> > does. Might be worth putting a comment. [What I think should happen is\r
+> > that a union of all the headers from all these is taken throwing away\r
+> > duplicate addresses but that is obviously not part of this patch set]\r
+>=20\r
+> I've never been sure about what the intended behavior is when replying\r
+> to multiple messages in the CLI. My thought was that it should create\r
+> a reply to each message, so an MUA could iterate over them allowing\r
+> you to compose replies to multiple messages. But, I've never wanted or\r
+> used such a feature, so I'm agnostic on whether it's right. The emacs\r
+> MUA (at least with my patch) ignores all but the first reply object in\r
+> the array, my assumption being that reply only operates on multiple\r
+> messages by accident.\r
+>=20\r
+\r
+In some cases, notmuch CLI insists that the search query matches exactly\r
+one message (e.g. notmuch show for parts).  IMO the same behavior makes\r
+sense for notmuch reply.\r
+\r
+Regards,\r
+  Dmitry\r
+\r
+> Does anyone use reply with multiple messages? If so, what semantics do\r
+> you expect?\r
+> _______________________________________________\r
+> notmuch mailing list\r
+> notmuch@notmuchmail.org\r
+> http://notmuchmail.org/mailman/listinfo/notmuch\r