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

2021-07-13 Thread Hannu Hartikainen
Thanks for reviewing the patch! On Tue, 13 Jul 2021 07:24:43 -0300, David Bremner wrote: > David Bremner 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. It returns null and the printing function prints out

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

2021-07-13 Thread David Bremner
David Bremner 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 me

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

2021-07-12 Thread David Bremner
Hannu Hartikainen writes: > +static notmuch_status_t > +format_part_pretty (const void *ctx, sprinter_t *sp, mime_node_t *node, > + int indent, const notmuch_show_params_t *params) > +{ > +/* The disposition and content-type metadata are associated with > + * the envelope

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

2021-07-12 Thread Hannu Hartikainen
This commit adds the display format `pretty`. It only shows the most important headers, similarly to `--format=text`, and only displays plaintext parts (ie. text/* but not text/html). However, compared to `--format=text` the output is kept as close to raw as possible. The rationale for this featur