- if (notmuch_query_count_messages (query) != 1) {
- fprintf (stderr, "Error: search term did not match precisely one message.\n");
+ status = notmuch_query_count_messages_st (query, &count);
+ if (print_status_query ("notmuch reply", query, status))
+ return 1;
+
+ if (count != 1) {
+ fprintf (stderr, "Error: search term did not match precisely one message (matched %d messages).\n", count);