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 3512D431FB6 for ; Fri, 10 Feb 2012 00:40:49 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.799 X-Spam-Level: X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] 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 5eLEd2Brl8D8 for ; Fri, 10 Feb 2012 00:40:48 -0800 (PST) Received: from mail-bk0-f53.google.com (mail-bk0-f53.google.com [209.85.214.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id BC150431FAE for ; Fri, 10 Feb 2012 00:40:47 -0800 (PST) Received: by bkcjk7 with SMTP id jk7so2542739bkc.26 for ; Fri, 10 Feb 2012 00:40:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:cc:subject:in-reply-to:references:user-agent:date :message-id:mime-version:content-type:content-transfer-encoding; bh=ThjjcjlffsiZN4LGTUQTvyPPPC6vruZiPr+/eBAiEGU=; b=DxO604tu+7CHKSnPipOfx+uXRj1rJoV79Ripe4scNkNwdPOsv+BjJ8Z9Chxcj8A4fJ JhfqV+tgoBuhTCtrU/u2PRAL9u6DEx6IsyhyUEju02M0qmjsXcENrdpP4q2yn8D6feQo g949zUodWiLBVZ4Ty8rSZ44DpasJg2L/qV8YM= Received: by 10.205.127.141 with SMTP id ha13mr2201628bkc.28.1328863244884; Fri, 10 Feb 2012 00:40:44 -0800 (PST) Received: from localhost ([91.144.186.21]) by mx.google.com with ESMTPS id ez5sm15429007bkc.15.2012.02.10.00.40.43 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 10 Feb 2012 00:40:43 -0800 (PST) From: Dmitry Kurochkin To: Adam Wolfe Gordon Subject: Re: [PATCH v4 2/4] reply: Add a JSON reply format. In-Reply-To: References: <1326995217-27423-1-git-send-email-awg+notmuch@xvx.ca> <1328746916-25447-1-git-send-email-awg+notmuch@xvx.ca> <1328746916-25447-3-git-send-email-awg+notmuch@xvx.ca> <87mx8sa2tj.fsf@gmail.com> User-Agent: Notmuch/0.11.1+167~g6e72434 (http://notmuchmail.org) Emacs/23.3.1 (x86_64-pc-linux-gnu) Date: Fri, 10 Feb 2012 12:39:23 +0400 Message-ID: <8762ff9j5w.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: notmuch@notmuchmail.org 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: Fri, 10 Feb 2012 08:40:50 -0000 Hi Adam. On Thu, 9 Feb 2012 21:27:29 -0700, Adam Wolfe Gordon w= rote: > Hi Dmitry, >=20 > On Thu, Feb 9, 2012 at 00:22, Dmitry Kurochkin > wrote: > >> Reply now enforces that only one message is returned, as the semantics > >> of replying to multiple messages are not wel-defined. > > > > s/wel/well/ >=20 > Oops! git filter-branch to the rescue :-). >=20 > >> Show is modified such that --format=3Djson no longer implies > >> --entire-thread, as MUAs will use --format=3Djson when constructing > >> replies. The man page is updated to reflect this change. > > > > I did not look into details. =C2=A0But I am surprised that user needs t= o call > > notmuch show --format=3Djson to make reply. =C2=A0I would expect notmuc= h reply > > to provide all required info (except for bodies). >=20 > I agree, it would be ideal to include the data from show --format=3Djson > in the reply JSON. I started down the path of implementing this, but > realized it requires either copying quite a bit of code from show or > factoring it out, and both options felt kind of dirty. I'd like show > and reply to share a function that produces the JSON-formatted body of > a message, but it doesn't feel right to expose the entire JSON format > and all the functions that go with it from notmuch-show.c and put the > structure and all the prototypes in notmuch-client.h. >=20 I see. > Will Austin's show rewrite make this easier/cleaner? Or am I being too > squeamish about moving code? >=20 It probably will. > > Anyway, I think you should put this change in a separate patch. >=20 > Yeah, if I leave it as is it changes a default behavior, so a separate > patch would probably be a good idea. >=20 > > Also, we clearly need a NEWS entry for it and user-customizable Emacs > > variable changes. =C2=A0Though it can be done after this series is push= ed, I > > guess. >=20 > I don't think there are any emacs customization changes here, unless > we want to implement the notmuch mode config file that was discussed > before to give message-citation-line-format and other things nice > defaults. Or are you suggesting that there should be some new > customization options? (One I can think of would be the list of > preferred types for multipart/alternative display, which right now is > hardcoded in notmuch-show.el.) >=20 No. I thought there were some user-customizable variables that were moved to notmuch-lib and renamed. If that is correct, it would not hurt to document these changes. > > Thank you for this work, it is much appreciated. >=20 > Thanks for taking the time to review these patches! I think as a > result of everyone's reviews I've pushed the series toward what I > envisioned/wanted in the first place, rather than the kinda kludgey > thing I did initially. >=20 No need to thank me for review, I did not do it :) > Amusingly, I've started a new job since I wrote the original patch and > no longer receive much HTML-only email, but I like this patch series > enough to see it through anyway :-). Congratulations with the new job :) Regards, Dmitry