Re: [PATCH] show: add In-reply-to, References fields to structured formats

Subject: Re: [PATCH] show: add In-reply-to, References fields to structured formats

Date: Mon, 13 Jan 2014 08:08:36 +1100

To: Jani Nikula

Cc: notmuch@notmuchmail.org

From: Peter Wang


On Sun, 12 Jan 2014 17:31:32 +0200, Jani Nikula <jani@nikula.org> wrote:
> On Sun, 12 Jan 2014, Peter Wang <novalazy@gmail.com> wrote:
> > This is useful when 'show' is used to retrieve a draft message
> > which is in reply to another message.
> 
> I'd like to know more about *how* this is useful. Indeed the whole big
> picture about supporting draft or postponed messages is foggy. I would
> like to have some clarity about that first.
> 
> Apparently the idea is to index draft messages. How do you save them?
> What guarantees are there that they look enough like real messages that
> they get indexed? Does this patch mean that the idea is to resume draft
> messages using the structured formats instead of opening the raw file?
> Why?  What do you plan to do with the saved draft? And so on...

I didn't realise storing drafts in your Maildir was unusual.

A draft message (including its attachments) may be added to a Maildir
folder with notmuch insert or notmuch-deliver, and then tagged.
The message must look enough like a real message for indexing but it is
not hard for an email client to arrange -- the message is ostensibly to
be sent anyway.  Unlike saving in a local file, keeping the draft in a
central mail store means it will be accessible anywhere that you can
access the rest of your mail.

Draft messages may be retrieved for previewing or resumption with
notmuch show, like other messages.  The raw file may be on another
machine so it is not always possible to read it directly.  The advantage
of using a structured output format instead of the raw output format is
the same as for any other message -- notmuch has already parsed it for
you.  The disadvantage is that notmuch show's structured output only
presents a subset of headers, so other headers will be lost.
(This suggests an alternative change if notmuch maintainers are
receptive.)

Indexed draft messages will, by default, show up in normal display
so they will need to be hidden with notmuch search exclusions.
Drafts may tagged with 'delete' for eventual removal.

Peter

Thread: