}
for (messages = notmuch_query_search_messages (query);
- notmuch_messages_has_more (messages) && !interrupted;
- notmuch_messages_advance (messages))
+ notmuch_messages_valid (messages) && !interrupted;
+ notmuch_messages_move_to_next (messages))
{
message = notmuch_messages_get (messages);