Re: [PATCH 1/1] lib/notmuch: update example

Subject: Re: [PATCH 1/1] lib/notmuch: update example

Date: Sun, 26 Feb 2023 07:34:57 -0400

To: Kevin Boulain, notmuch@notmuchmail.org

Cc: Kevin Boulain

From: David Bremner


Kevin Boulain <kevin@boula.in> writes:

> Likely missed in 86cbd215e, when notmuch_query_search_messages_st was
> renamed to notmuch_query_search_messages.
> ---
>  lib/notmuch.h | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/lib/notmuch.h b/lib/notmuch.h
> index ce375c04..73e246e0 100644
> --- a/lib/notmuch.h
> +++ b/lib/notmuch.h
> @@ -1172,7 +1172,8 @@ notmuch_query_search_threads_st (notmuch_query_t *query, notmuch_threads_t **out
>   *
>   *     query = notmuch_query_create (database, query_string);
>   *
> - *     for (messages = notmuch_query_search_messages (query);
> + *     notmuch_query_search_messages (query, &messages);
> + *     for (;
>   *          notmuch_messages_valid (messages);
>   *          notmuch_messages_move_to_next (messages))
>   *     {

Thanks for the documentation update, but I don't think we should
encourage people to ignore the status code. Perhaps something like

    if (notmuch_query_search_messages (query, &messages))
       return EXIT_FAILURE;
    for (;


_______________________________________________
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-leave@notmuchmail.org

Thread: