show_text_part_content (node->part, stream_stdout, NOTMUCH_SHOW_TEXT_PART_REPLY);
g_object_unref(stream_stdout);
} else if (disposition &&
- strcmp (disposition->disposition, GMIME_DISPOSITION_ATTACHMENT) == 0) {
+ strcasecmp (g_mime_content_disposition_get_disposition (disposition),
+ GMIME_DISPOSITION_ATTACHMENT) == 0) {
const char *filename = g_mime_part_get_filename (GMIME_PART (node->part));
printf ("Attachment: %s (%s)\n", filename,
g_mime_content_type_to_string (content_type));
notmuch_messages_t *messages;
notmuch_message_t *message;
mime_node_t *root;
+ notmuch_status_t status;
- for (messages = notmuch_query_search_messages (query);
+ status = notmuch_query_search_messages_st (query, &messages);
+ if (print_status_query ("notmuch reply", query, status))
+ return 1;
+
+ for (;
notmuch_messages_valid (messages);
notmuch_messages_move_to_next (messages))
{
notmuch_messages_t *messages;
notmuch_message_t *message;
mime_node_t *node;
+ unsigned count;
+ notmuch_status_t status;
+
+ status = notmuch_query_count_messages_st (query, &count);
+ if (print_status_query ("notmuch reply", query, status))
+ return 1;
- if (notmuch_query_count_messages (query) != 1) {
+ if (count != 1) {
fprintf (stderr, "Error: search term did not match precisely one message.\n");
return 1;
}
- messages = notmuch_query_search_messages (query);
+ status = notmuch_query_search_messages_st (query, &messages);
+ if (print_status_query ("notmuch reply", query, status))
+ return 1;
+
message = notmuch_messages_get (messages);
if (mime_node_open (ctx, message, &(params->crypto), &node) != NOTMUCH_STATUS_SUCCESS)
return 1;
notmuch_message_t *message;
const char *in_reply_to, *orig_references, *references;
char *reply_headers;
+ notmuch_status_t status;
+
+ status = notmuch_query_search_messages_st (query, &messages);
+ if (print_status_query ("notmuch reply", query, status))
+ return 1;
- for (messages = notmuch_query_search_messages (query);
+ for (;
notmuch_messages_valid (messages);
notmuch_messages_move_to_next (messages))
{