X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=notmuch-show.c;h=4ed5ff2b7dc54c2f2791a8685ea207b7ae166ba3;hb=570349e132da5e19b36a004e633b870cec810170;hp=42fe27cc99fca564f237f550c60db01d17408794;hpb=37e5bc00aeb9123dd88367b7506a19f74877dfe4;p=notmuch diff --git a/notmuch-show.c b/notmuch-show.c index 42fe27cc..4ed5ff2b 100644 --- a/notmuch-show.c +++ b/notmuch-show.c @@ -427,15 +427,13 @@ format_signature_errors (sprinter_t *sp, GMimeSignature *signature) } #endif -/* Signature status sprinter (GMime 2.6) */ +/* Signature status sprinter */ static void -format_part_sigstatus_sprinter (sprinter_t *sp, mime_node_t *node) +format_part_sigstatus_sprinter (sprinter_t *sp, GMimeSignatureList *siglist) { /* Any changes to the JSON or S-Expression format should be * reflected in the file devel/schemata. */ - GMimeSignatureList *siglist = node->sig_list; - sp->begin_list (sp); if (!siglist) { @@ -584,7 +582,8 @@ format_part_text (const void *ctx, sprinter_t *sp, mime_node_t *node, if (leaf) { if (g_mime_content_type_is_type (content_type, "text", "*") && - !g_mime_content_type_is_type (content_type, "text", "html")) + (params->include_html || + ! g_mime_content_type_is_type (content_type, "text", "html"))) { show_text_part_content (node->part, stream, 0); } else { @@ -683,7 +682,7 @@ format_part_sprinter (const void *ctx, sprinter_t *sp, mime_node_t *node, if (node->verify_attempted) { sp->map_key (sp, "sigstatus"); - format_part_sigstatus_sprinter (sp, node); + format_part_sigstatus_sprinter (sp, node->sig_list); } sp->map_key (sp, "content-type"); @@ -1218,8 +1217,10 @@ notmuch_show_command (notmuch_config_t *config, int argc, char *argv[]) } if (params.include_html && - (format != NOTMUCH_FORMAT_JSON && format != NOTMUCH_FORMAT_SEXP)) { - fprintf (stderr, "Warning: --include-html only implemented for format=json and format=sexp\n"); + (format != NOTMUCH_FORMAT_TEXT && + format != NOTMUCH_FORMAT_JSON && + format != NOTMUCH_FORMAT_SEXP)) { + fprintf (stderr, "Warning: --include-html only implemented for format=text, format=json and format=sexp\n"); } query_string = query_string_from_args (config, argc-opt_index, argv+opt_index);