unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Dmitry Kurochkin <dmitry.kurochkin@gmail.com>
To: Adam Wolfe Gordon <awg+notmuch@xvx.ca>
Cc: notmuch@notmuchmail.org
Subject: Re: [PATCH v4 2/4] reply: Add a JSON reply format.
Date: Fri, 10 Feb 2012 12:39:23 +0400	[thread overview]
Message-ID: <8762ff9j5w.fsf@gmail.com> (raw)
In-Reply-To: <CAMoJFUshAUAO6hnYWefXgdBdZe3qavgWokLC8du3VWGYDb9RUQ@mail.gmail.com>

Hi Adam.

On Thu, 9 Feb 2012 21:27:29 -0700, Adam Wolfe Gordon <awg+notmuch@xvx.ca> wrote:
> Hi Dmitry,
> 
> On Thu, Feb 9, 2012 at 00:22, Dmitry Kurochkin
> <dmitry.kurochkin@gmail.com> 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/
> 
> Oops! git filter-branch to the rescue :-).
> 
> >> Show is modified such that --format=json no longer implies
> >> --entire-thread, as MUAs will use --format=json when constructing
> >> replies. The man page is updated to reflect this change.
> >
> > I did not look into details.  But I am surprised that user needs to call
> > notmuch show --format=json to make reply.  I would expect notmuch reply
> > to provide all required info (except for bodies).
> 
> I agree, it would be ideal to include the data from show --format=json
> 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.
> 

I see.

> Will Austin's show rewrite make this easier/cleaner? Or am I being too
> squeamish about moving code?
> 

It probably will.

> > Anyway, I think you should put this change in a separate patch.
> 
> Yeah, if I leave it as is it changes a default behavior, so a separate
> patch would probably be a good idea.
> 
> > Also, we clearly need a NEWS entry for it and user-customizable Emacs
> > variable changes.  Though it can be done after this series is pushed, I
> > guess.
> 
> 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.)
> 

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.
> 
> 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.
> 

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

  reply	other threads:[~2012-02-10  8:40 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-19 17:46 [PATCH v3 0/5] Quoting HTML emails in reply Adam Wolfe Gordon
2012-01-19 17:46 ` [PATCH v3 1/5] test: Add broken test for the new JSON reply format Adam Wolfe Gordon
2012-01-19 17:46 ` [PATCH v3 2/5] reply: Add a " Adam Wolfe Gordon
2012-02-05 11:50   ` Mark Walters
2012-02-05 12:45     ` Mark Walters
2012-02-05 19:42     ` Adam Wolfe Gordon
2012-02-05 19:50       ` Dmitry Kurochkin
2012-02-06  3:44   ` Austin Clements
2012-02-06  6:27     ` Adam Wolfe Gordon
2012-01-19 17:46 ` [PATCH v3 3/5] man: Update notmuch-reply man page for JSON format Adam Wolfe Gordon
2012-01-19 17:46 ` [PATCH v3 4/5] emacs: Use the new JSON reply format Adam Wolfe Gordon
2012-02-05 12:41   ` Mark Walters
2012-01-19 17:46 ` [PATCH v3 5/5] emacs: Use message-citation-line-format in reply Adam Wolfe Gordon
2012-01-19 18:45   ` Aaron Ecay
2012-01-20  4:46     ` Adam Wolfe Gordon
2012-01-20  5:53       ` Aaron Ecay
2012-01-20  9:14         ` David Edmondson
2012-01-20 17:22         ` Adam Wolfe Gordon
2012-01-20 22:31           ` Tomi Ollila
2012-01-22 18:58   ` [PATCH v3 5/5] emacs: Use message-cite-original " Adam Wolfe Gordon
2012-02-09  0:21 ` [PATCH v4 0/4] Quoting HTML parts in reply (and other reply enhancements) Adam Wolfe Gordon
2012-02-09  0:21   ` [PATCH v4 1/4] test: Add broken test for the new JSON reply format Adam Wolfe Gordon
2012-02-09  0:21   ` [PATCH v4 2/4] reply: Add a " Adam Wolfe Gordon
2012-02-09  7:22     ` Dmitry Kurochkin
2012-02-10  4:27       ` Adam Wolfe Gordon
2012-02-10  8:39         ` Dmitry Kurochkin [this message]
2012-02-09  0:21   ` [PATCH v4 3/4] man: Update notmuch-reply man page for JSON format Adam Wolfe Gordon
2012-02-09  0:21   ` [PATCH v4 4/4] emacs: Use the new JSON reply format and message-cite-original Adam Wolfe Gordon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8762ff9j5w.fsf@gmail.com \
    --to=dmitry.kurochkin@gmail.com \
    --cc=awg+notmuch@xvx.ca \
    --cc=notmuch@notmuchmail.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).