+static void
+format_message_text (unused (const void *ctx),
+ notmuch_message_t *message,
+ int indent);
+static void
+format_headers_text (const void *ctx,
+ notmuch_message_t *message);
+
+static void
+format_part_text (GMimeObject *part,
+ int *part_count);
+
+static void
+format_part_end_text (GMimeObject *part);
+
+static const notmuch_show_format_t format_text = {
+ "",
+ "\fmessage{ ", format_message_text,
+ "\fheader{\n", format_headers_text, "\fheader}\n",
+ "\fbody{\n", format_part_text, format_part_end_text, "", "\fbody}\n",
+ "\fmessage}\n", "",
+ ""
+};
+
+static void
+format_message_json (const void *ctx,
+ notmuch_message_t *message,
+ unused (int indent));
+static void
+format_headers_json (const void *ctx,
+ notmuch_message_t *message);
+
+static void
+format_part_json (GMimeObject *part,
+ int *part_count);
+
+static void
+format_part_end_json (GMimeObject *part);
+
+static const notmuch_show_format_t format_json = {
+ "[",
+ "{", format_message_json,
+ ", \"headers\": {", format_headers_json, "}",
+ ", \"body\": [", format_part_json, format_part_end_json, ", ", "]",
+ "}", ", ",
+ "]"
+};
+
+static void
+format_message_mbox (const void *ctx,
+ notmuch_message_t *message,
+ unused (int indent));
+
+static const notmuch_show_format_t format_mbox = {
+ "",
+ "", format_message_mbox,
+ "", NULL, "",
+ "", NULL, NULL, "", "",
+ "", "",
+ ""
+};
+
+static void
+format_part_raw (GMimeObject *part,
+ unused (int *part_count));
+
+static const notmuch_show_format_t format_raw = {
+ "",
+ "", NULL,
+ "", NULL, "",
+ "", format_part_raw, NULL, "", "",
+ "", "",
+ ""
+};
+