unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [PATCH 1/1] lib/notmuch: update example
@ 2023-02-25 17:45 Kevin Boulain
  2023-02-26 11:34 ` David Bremner
  0 siblings, 1 reply; 4+ messages in thread
From: Kevin Boulain @ 2023-02-25 17:45 UTC (permalink / raw)
  To: notmuch; +Cc: Kevin Boulain

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))
  *     {

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/1] lib/notmuch: update example
  2023-02-25 17:45 [PATCH 1/1] lib/notmuch: update example Kevin Boulain
@ 2023-02-26 11:34 ` David Bremner
  2023-02-27 12:06   ` Kevin Boulain
  0 siblings, 1 reply; 4+ messages in thread
From: David Bremner @ 2023-02-26 11:34 UTC (permalink / raw)
  To: Kevin Boulain, notmuch; +Cc: Kevin Boulain

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 (;


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/1] lib/notmuch: update example
  2023-02-26 11:34 ` David Bremner
@ 2023-02-27 12:06   ` Kevin Boulain
  2023-02-27 12:39     ` David Bremner
  0 siblings, 1 reply; 4+ messages in thread
From: Kevin Boulain @ 2023-02-27 12:06 UTC (permalink / raw)
  To: notmuch; +Cc: Kevin Boulain

Likely missed in 86cbd215e, when notmuch_query_search_messages_st was
renamed to notmuch_query_search_messages.
---

> I don't think we should encourage people to ignore the status code.

Makes sense, I wasn't too sure if the example was deliberately
minimal.

 lib/notmuch.h | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/lib/notmuch.h b/lib/notmuch.h
index ce375c04..89018392 100644
--- a/lib/notmuch.h
+++ b/lib/notmuch.h
@@ -1172,7 +1172,10 @@ 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);
+ *     if (notmuch_query_search_messages (query, &messages) != NOTMUCH_STATUS_SUCCESS)
+ *         return EXIT_FAILURE;
+ *
+ *     for (;
  *          notmuch_messages_valid (messages);
  *          notmuch_messages_move_to_next (messages))
  *     {

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/1] lib/notmuch: update example
  2023-02-27 12:06   ` Kevin Boulain
@ 2023-02-27 12:39     ` David Bremner
  0 siblings, 0 replies; 4+ messages in thread
From: David Bremner @ 2023-02-27 12:39 UTC (permalink / raw)
  To: Kevin Boulain, notmuch; +Cc: Kevin Boulain

Kevin Boulain <kevin@boula.in> writes:

> Likely missed in 86cbd215e, when notmuch_query_search_messages_st was
> renamed to notmuch_query_search_messages.
> ---

Applied to master, thanks.

d

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-02-27 12:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-25 17:45 [PATCH 1/1] lib/notmuch: update example Kevin Boulain
2023-02-26 11:34 ` David Bremner
2023-02-27 12:06   ` Kevin Boulain
2023-02-27 12:39     ` David Bremner

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).