unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: David Bremner <david@tethera.net>
To: mbw+nm@mailbox.org, notmuch@notmuchmail.org
Subject: Re: Questions regarding headers that may occur multiple times
Date: Sat, 12 Feb 2022 08:48:24 -0400	[thread overview]
Message-ID: <87czjsxnc7.fsf@tethera.net> (raw)
In-Reply-To: <20220211081619.wfpduunaoe2fnfub@legion.localdomain>

mbw+nm@mailbox.org 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. 

      reply	other threads:[~2022-02-12 12:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-11  8:16 Questions regarding headers that may occur multiple times mbw+nm
2022-02-12 12:48 ` David Bremner [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87czjsxnc7.fsf@tethera.net \
    --to=david@tethera.net \
    --cc=mbw+nm@mailbox.org \
    --cc=notmuch@notmuchmail.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).