[PATCH] lib: Add a new prefix "list" to the search-terms syntax

David Bremner david at tethera.net
Sat Apr 6 04:54:59 PDT 2013


"Alexey I. Froloff" <raorn at raorn.name> writes:
> +
> +    /* Description may be RFC2047 encoded */
> +    char *decoded_desc = g_mime_utils_header_decode_phrase(description);

Surprisingly, the docs claim g_mime_utils_header_decode_phrase has no
error conditions, so I guess this is OK.

> +
> +    _notmuch_message_gen_terms(message, "list", list_id);
> +
> +    if (decoded_desc)
> +	_notmuch_message_gen_terms(message, "list", decoded_desc);
> 

On the other hand, _notmuch_message_gen_terms does return a status. I
agree that currently this status is not useful, but that could change in
the future.  I also agree that the existing code does the same thing in
a few places, but I think it's better not to introduce more.

We'll need a test or two before we introduce a core change.

Any objections to the list: syntax?  The only issue I see is that at
some point we will probably add a generic header search syntax, and this
implicitly says list-id is more important/common than other headers.

d




More information about the notmuch mailing list