Re: [PATCH v2 0/3] composing patches

Subject: Re: [PATCH v2 0/3] composing patches

Date: Wed, 18 Apr 2012 11:36:36 -0600

To: Felipe Contreras

Cc: notmuch@notmuchmail.org

From: Adam Wolfe Gordon


Hi Felipe,

On Wed, Apr 18, 2012 at 06:39, Felipe Contreras
<felipe.contreras@gmail.com> wrote:
> I don't know how it works in gnus, but at least on the vim mode, the output
> generated by 'notmuch reply' is not ready to be sent, at least the Message-ID
> field is needed, and also is nice to have the User-Agent.

In the emacs interface, the Message-ID header is generated when the
message is sent, so it never shows up in the reply buffer. The
User-Agent header is created by the emacs reply code.

> Besides, in order to avoid creating a new message by hand (possibly fetching
> the info from notmuch config), it's more straightforward to have 'notmuch
> compose' command.
>
> In the future 'notmuch compose' might be used to replace 'notmuch reply' and
> possily add a forward option too. It might also be possible to add mail aliases
> when composing a message, and these aliases might be used while generating the
> 'notmuch search' output.

I can see how this functionality is useful, and I like the idea of
consolidating message creation, forwarding, and reply. However, if
this is intended to replace or share code with reply (and I think it
should), it should support all the existing reply formats: default,
json, and headers-only.

In fact, I think it might make more sense to make this work an
extension of the existing reply code rather than a rewrite.
notmuch-reply.c could become notmuch-compose.c, and provide the
compose command (with flags for creating a reply), and also the reply
command (which would just be an alias to the compose functionality).

>  Makefile.local    |    1 +
>  notmuch-client.h  |    3 ++
>  notmuch-compose.c |  111 +++++++++++++++++++++++++++++++++++++++++++++++++++++
>  notmuch-reply.c   |   17 ++++++++
>  notmuch.c         |    5 +++

Such a big new features should definitely have some tests.

-- Adam

Thread: