From: Floris Bruynooghe <flub@devork.be>
To: Michael J Gruber <git@grubix.eu>,
David Bremner <david@tethera.net>,
notmuch@notmuchmail.org
Subject: Re: [PATCH 0/3] python/notmuch2: a few docstrings and collect_tags()
Date: Mon, 11 Jan 2021 21:47:33 +0100 [thread overview]
Message-ID: <87o8hv42vu.fsf@powell.devork.be> (raw)
In-Reply-To: <E1kxYme-0002nO-P1@sphinx.mythic-beasts.com>
On Thu 07 Jan 2021 at 17:09 +0000, Michael J. Gruber wrote:
> As for the series: the notmuch based MUA "alot" switched to the new
> python bindings recently. collect_tags() is something I used in a
> feature PR submitted but not merged yet there (while on the old bindings),
> and in my updated feature PR there I directly roll
> notmuch2._tags.ImmutableTagSet(msgs, '_iter_p', notmuch2.capi.lib.notmuch_messages_collect_tags).
You could do this entirely in the public bindings too could you not?
Something like (untested):
def collect_tags(db, query):
tags = set()
for msg in db.messages(query):
tags.update(msg.tags)
anyway, i guess the internal APIs you use won't change before your
patchset here lands so this doesn't matter much.
> I don't know whether this will land in alot, but feature parity of the
> new bindings with the old ones is a good aim
Thanks for contributing this! I never aimed for full parity because I
didn't feel like making the API decisions for APIs I had no need to use
myself. But it's great when people needing things can add it!
Cheers,
Floris
next prev parent reply other threads:[~2021-01-11 20:47 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-06 9:08 [PATCH 0/3] python/notmuch2: a few docstrings and collect_tags() Michael J Gruber
2021-01-06 9:08 ` [PATCH 1/3] python/notmuch2: correct docstring for Database.count_messages() Michael J Gruber
2021-01-06 9:08 ` [PATCH 2/3] python/notmuch2: docstrings for Database.threads(), Database.count_threads() Michael J Gruber
2021-01-06 9:08 ` [PATCH 3/3] python/notmuch2: provide binding for collect_tags() Michael J Gruber
2021-01-11 20:33 ` Floris Bruynooghe
2021-02-11 17:06 ` Michael J Gruber
2021-01-07 14:35 ` [PATCH 0/3] python/notmuch2: a few docstrings and collect_tags() David Bremner
[not found] ` <E1kxYme-0002nO-P1@sphinx.mythic-beasts.com>
2021-01-11 20:47 ` Floris Bruynooghe [this message]
2021-01-12 9:13 ` Michael J Gruber
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=87o8hv42vu.fsf@powell.devork.be \
--to=flub@devork.be \
--cc=david@tethera.net \
--cc=git@grubix.eu \
--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).