- for (messages = notmuch_query_search_messages (query, 0, -1);
- notmuch_messages_has_more (messages);
- notmuch_messages_advance (messages))
+ for (messages = notmuch_query_search_messages (query);
+ notmuch_messages_valid (messages);
+ notmuch_messages_move_to_next (messages))