Re: Questions regarding headers that may occur multiple times

Subject: Re: Questions regarding headers that may occur multiple times

Date: Sat, 12 Feb 2022 08:48:24 -0400



From: David Bremner writes:

TL;DR: yes, the things you think are not supported are not supported.

> it appears that only the first occurrence of these header values are
> taken into account?

Yes, we use g_mime_object_get_header, which "Gets the value of the first
header with the specified name.".

> What I would like to do is to somehow access the second (or maybe all)
> occurrences of these header values. Is that possible?

Not with the current indexing implementation. In principle it would be
possible to change the indexer to scan all of the headers for each user
defined header to be indexed. I don't know how bad the performance
impact would be; it would mean moving from a hash table lookup to a
linear scan of the headers, but perhaps that time is small relative to
the work of actually updating the database.

> It also appears that (with notmuch 0.35), the `extra_headers` only show
> up with `--format.json`, by the way.

Also for s-expression output (and raw, fwiw), but yes the text format is
missing quite a few features. The problem is that it does not use the
same "structured output" code as the other formats, it's essentially
double the code/bugs to support new features in the text format. For
that reason the format has been more or less frozen since the emacs
front-end (and vim front end iirc) stopped using it. 
notmuch mailing list --
To unsubscribe send an email to