Re: [PATCH v3 1/2] cli/show: add --format=pretty

Subject:Re: [PATCH v3 1/2] cli/show: add --format=pretty

Date:Tue, 13 Jul 2021 07:24:43 -0300

To:Hannu Hartikainen ,notmuch@notmuchmail.org

Cc:David Edmondson

From:David Bremner


David Bremner <david@tethera.net> writes:

>
> I don't know what g_mime_message_get_message_id will return if there is
> no message-id, but that case can and does arise. Notmuch constructs a
> message-id by sha1 hashing the message. That message-id is in the
> database, so I think you should probably print out the message-id from
> the database.
>

I expect that would require somehow making the notmuch_database_t object
available inside the sprinter. We want this for at least one other
feature request (configurable headers in json / sexpr output), so it's
not as much of a "waste" of effort as it might seem at first.  The
options are adding extra arguments to functions and stashing a copy of
the pointer in some struct (perhaps the sprinter struct). I think David
E has a prototype of the former. My own instincts is that the latter
will be more general.  The previous consensus was that we did not want
to add static (file scope) variables, even though that would be the
quick and dirty solution.

d
_______________________________________________
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-leave@notmuchmail.org

Thread: