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);
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 },
return EXIT_FAILURE;
}
+ notmuch_query_set_sort (query, sort);
+
/* Create structure printer. */
formatter = formatters[format];
sprinter = formatter->new_sprinter (notmuch, stdout);