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

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

Date: Thu, 21 Nov 2019 08:16:02 -0400

To: Daniel Kahn Gillmor, Johan Parin, notmuch@notmuchmail.org

Cc: Johan Parin

From: David Bremner


Daniel Kahn Gillmor <dkg@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.
_______________________________________________
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch

Thread: