unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: David Bremner <david@tethera.net>
To: Floris Bruynooghe <flub@devork.be>, notmuch@notmuchmail.org
Subject: Re: [RFC PATCH] lib: document new database_open API
Date: Sat, 04 Jul 2020 14:01:04 -0300	[thread overview]
Message-ID: <87h7unkyen.fsf@tethera.net> (raw)
In-Reply-To: <87eeprxn3m.fsf@powell.devork.be>

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?

> 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

  reply	other threads:[~2020-07-04 17:01 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 [this message]
2020-07-08 20:03     ` Floris Bruynooghe

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=87h7unkyen.fsf@tethera.net \
    --to=david@tethera.net \
    --cc=flub@devork.be \
    --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).