From: Floris Bruynooghe <flub@devork.be>
To: David Bremner <david@tethera.net>, notmuch@notmuchmail.org
Subject: Re: [RFC PATCH] lib: document new database_open API
Date: Wed, 08 Jul 2020 22:03:30 +0200 [thread overview]
Message-ID: <87wo3dbwq5.fsf@powell.devork.be> (raw)
In-Reply-To: <87h7unkyen.fsf@tethera.net>
On Sat 04 Jul 2020 at 14:01 -0300, David Bremner wrote:
> Floris Bruynooghe <flub@devork.be> writes:
>
>>> + *
>>> + * - in the environment variable NOTMUCH_DATABASE, if non-empty
>>> + *
>>> + * - by $XDG_DATA_HOME/notmuch/$NOTMUCH_PROFILE where XDG_DATA_HOME
>>> + * defaults to "$HOME/.local/share" and NOTMUCH_PROFILE defaults to
>>> + * "default"
>>
>> I like the profile support, is the plan for
>> $XDG_DATA_HOME/notmuch/$NOTMUCH_PROFILE to be written when creating the
>> database?
>
> Yes, with "NOTMUCH_PROFILE=default" by default.
>
>> It's nice that the environment variable handling is done in the library,
>> should make it more consistent for bindings. As long as it can be
>> overwritten I guess.
>
> Overwritten how? By passing parameters?
yes, that's what I meant. Which I think you design here allows. Just
takes a while to figure out what the right parameter combination
is... ;)
>> The API is rather complex though, perhaps easier when split across
>> several functions? Maybe a notmuch_database_open_profile(const char
>> *profile, notmuch_database_t**) is useful as the simple one which always
>> does the right thing when called with NULL for profile. Not sure what
>> other combinations would be needed.
>
> I have no objections to a "do the write thing" wrapper or two. I don't
> think that increases maintence cost too much.
>
> d
prev parent reply other threads:[~2020-07-08 20:03 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-03 13:43 [RFC PATCH] lib: document new database_open API David Bremner
2020-07-03 13:52 ` David Bremner
2020-07-04 16:26 ` Floris Bruynooghe
2020-07-04 17:01 ` David Bremner
2020-07-08 20:03 ` Floris Bruynooghe [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=87wo3dbwq5.fsf@powell.devork.be \
--to=flub@devork.be \
--cc=david@tethera.net \
--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).