[PATCH] Display extra headers for emacs-mua - db config option

David Bremner david at tethera.net
Thu Nov 21 04:16:02 PST 2019


Daniel Kahn Gillmor <dkg at fifthhorseman.net> writes:

>
> I'm a little weirded out by the move to a static notmuch_database_t
> *notmuch object.  Are we doing this because we don't want to pass around
> the database to internal functions?  I know that the scope of
> nomtuch-show.c is basically "global scope", but i worry that it makes
> the code more difficult to read and maintain.

I had a similar reaction.

>
> It's also not a common idiom in the rest of the codebase (at least not
> one that i've seen).
>
> Is it that much worse to pass around the notmuch_database_t *?

There are some call chains 3 or 4 deep that would need to be modified. I
_think_ that there is always a notmuch_config_t available, so one option
would be to stash the headers or the database there. We do have the
convention other places (mainly in  lib/) of objects having a pointer to
their "parent" database.


More information about the notmuch mailing list