diff options
| author | Peter Feigl <craven@gmx.net> | 2012-12-06 22:12:13 +0100 |
|---|---|---|
| committer | David Bremner <bremner@debian.org> | 2012-12-08 09:30:19 -0400 |
| commit | 102f58d7a4532aa5f7a21edfd24758be864ea8d4 (patch) | |
| tree | 4aae8e9c7683d118fb5ef41fce624df3c70fb68f /notmuch-reply.c | |
| parent | 1bf3720b6eaca6698f25781a7d299afcbd7a4be8 (diff) | |
Use the S-Expression structured printer in notmuch-show, notmuch-reply and notmuch-search.
This patch uses the new S-Expression printer in the notmuch CLI (show,
search and reply). You can now use --format=sexp for any of them.
Diffstat (limited to 'notmuch-reply.c')
| -rw-r--r-- | notmuch-reply.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/notmuch-reply.c b/notmuch-reply.c index ef450b24..720749d5 100644 --- a/notmuch-reply.c +++ b/notmuch-reply.c @@ -697,6 +697,7 @@ notmuch_reply_format_headers_only(void *ctx, enum { FORMAT_DEFAULT, FORMAT_JSON, + FORMAT_SEXP, FORMAT_HEADERS_ONLY, }; @@ -729,6 +730,7 @@ notmuch_reply_command (void *ctx, int argc, char *argv[]) { NOTMUCH_OPT_KEYWORD, &format, "format", 'f', (notmuch_keyword_t []){ { "default", FORMAT_DEFAULT }, { "json", FORMAT_JSON }, + { "sexp", FORMAT_SEXP }, { "headers-only", FORMAT_HEADERS_ONLY }, { 0, 0 } } }, { NOTMUCH_OPT_KEYWORD, &reply_all, "reply-to", 'r', @@ -750,6 +752,9 @@ notmuch_reply_command (void *ctx, int argc, char *argv[]) } else if (format == FORMAT_JSON) { reply_format_func = notmuch_reply_format_sprinter; sp = sprinter_json_create (ctx, stdout); + } else if (format == FORMAT_SEXP) { + reply_format_func = notmuch_reply_format_sprinter; + sp = sprinter_sexp_create (ctx, stdout); } else { reply_format_func = notmuch_reply_format_default; } |
