X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=notmuch-show.c;h=c8f1a40f2e2803bfa93db1f5eb58132ddbd8b230;hb=3df2281746d57abbb45790ecb432ef40533c30bc;hp=481e5d540a6f2c2cff23b0e33548726da13ed891;hpb=6e6c319c260b779e6e91905f8c142ad2b82a41c9;p=notmuch diff --git a/notmuch-show.c b/notmuch-show.c index 481e5d54..c8f1a40f 100644 --- a/notmuch-show.c +++ b/notmuch-show.c @@ -475,6 +475,11 @@ format_part_sigstatus_sprinter (sprinter_t *sp, GMimeSignatureList *siglist) sp->map_key (sp, "userid"); sp->string (sp, uid); } + const char *email = g_mime_certificate_get_valid_email (certificate); + if (email) { + sp->map_key (sp, "email"); + sp->string (sp, email); + } } } else if (certificate) { const char *key_id = g_mime_certificate_get_fpr16 (certificate); @@ -1225,8 +1230,7 @@ static const notmuch_show_format_t *formatters[] = { }; int -notmuch_show_command (unused (notmuch_config_t *config), notmuch_database_t *notmuch, - int argc, char *argv[]) +notmuch_show_command (notmuch_database_t *notmuch, int argc, char *argv[]) { notmuch_query_t *query; char *query_string; @@ -1245,8 +1249,13 @@ notmuch_show_command (unused (notmuch_config_t *config), notmuch_database_t *not bool single_message; bool unthreaded = FALSE; notmuch_status_t status; + int sort = NOTMUCH_SORT_NEWEST_FIRST; notmuch_opt_desc_t options[] = { + { .opt_keyword = &sort, .name = "sort", .keywords = + (notmuch_keyword_t []){ { "oldest-first", NOTMUCH_SORT_OLDEST_FIRST }, + { "newest-first", NOTMUCH_SORT_NEWEST_FIRST }, + { 0, 0 } } }, { .opt_keyword = &format, .name = "format", .keywords = (notmuch_keyword_t []){ { "json", NOTMUCH_FORMAT_JSON }, { "text", NOTMUCH_FORMAT_TEXT }, @@ -1363,6 +1372,8 @@ notmuch_show_command (unused (notmuch_config_t *config), notmuch_database_t *not return EXIT_FAILURE; } + notmuch_query_set_sort (query, sort); + /* Create structure printer. */ formatter = formatters[format]; sprinter = formatter->new_sprinter (notmuch, stdout);