From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id AKFLMacmBl8IdQAA0tVLHw (envelope-from ) for ; Wed, 08 Jul 2020 20:03:51 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id 6H4WLacmBl8NOwAAbx9fmQ (envelope-from ) for ; Wed, 08 Jul 2020 20:03:51 +0000 Received: from mail.notmuchmail.org (nmbug.tethera.net [144.217.243.247]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id D42A89408E7 for ; Wed, 8 Jul 2020 20:03:49 +0000 (UTC) Received: from [144.217.243.247] (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 53EDD1FC39; Wed, 8 Jul 2020 16:03:43 -0400 (EDT) Received: from mail-ed1-x544.google.com (mail-ed1-x544.google.com [IPv6:2a00:1450:4864:20::544]) by mail.notmuchmail.org (Postfix) with ESMTPS id EB6CD1FAE3 for ; Wed, 8 Jul 2020 16:03:39 -0400 (EDT) Received: by mail-ed1-x544.google.com with SMTP id e15so44967edr.2 for ; Wed, 08 Jul 2020 13:03:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:subject:in-reply-to:references:date:message-id :mime-version; bh=jCIrW8jUuNTY+odwwOcBIjoj/wVMhUJQf1qQEL5u92s=; b=iZvQFvJ67MJABNwajwfZyVOuZ4FVEY1Qj5ITy9prwk9c3b4Ym8kbmAS+2aow+G4+IY X4pn8I5VA6GPp8Ip2l2pAcKymCBpHYrfYrFyExsp/z8WjYOra2PCRY2HMCI93qWNimfp 5EbIy+3LfrWVf/68JVx0V2waSV4389V1LPHidZ8QfL3q/eb+2SIhY/0B4+3wsvXw1toU J1CRRjbiD+8NUcqjHsDGv4RIUU9alcC+nIbveM9IPR8cB4EThUOh3KpIWMhW6A49pCoN QhvhCAj+RD+fueAC5t5fsk2xtvxRizH6DnMoM5B3PxiKPoSc5VC1yYZvlqLQjeAZeCTh MAOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:subject:in-reply-to:references :date:message-id:mime-version; bh=jCIrW8jUuNTY+odwwOcBIjoj/wVMhUJQf1qQEL5u92s=; b=dEo54FF7bB3Sw3VMNb8iY+f/GJCi7hgqhbQTIntm4GgeRkmPba8cOdLO8mAIMg6llO Jaf3fr81P5offoGaaGKeJkbrk3SN6Omj0VoE7YCG/gMFSRGWMy+C8nIiUvco+iHcgiJ1 +1VVte1nLNsf0q4NtGbN2hsHhCVtU4ZxjyvQhNTSLOategplg+NWkmyOm1HYBQw0wR+8 IkA/zD/Pl1IXAuPPRtomxnc0E0eDfVarZ0yxyXfIeJzvxBfwpYiRGDHCwz1r5Ot6mEVG JwZSCDNNQRQFfmJDhVE7cxoPV36T7TfvpxHtHiVBx0Y4z1JxGFmAUHT0YybwUy1YlFHp NHZA== X-Gm-Message-State: AOAM532LhnuedhiWZPOoMBraTFn4qRjxM5HJr+CAP4RF5GdN29U5+tbv tOYbTtdfXIKzzHrXIr0SoO0= X-Google-Smtp-Source: ABdhPJxLVq1dHF/e+7zQJRQ9+noPKAi4GIl0F1rTYYGxBbdmIZXkQ7BAQS9D/iFKC1M0BtDHmQIQGg== X-Received: by 2002:aa7:d341:: with SMTP id m1mr55470523edr.50.1594238611826; Wed, 08 Jul 2020 13:03:31 -0700 (PDT) Received: from powell.devork.be (2a02-8388-8480-1180-4c18-fc69-8d8c-22b5.cable.dynamic.v6.surfer.at. [2a02:8388:8480:1180:4c18:fc69:8d8c:22b5]) by smtp.gmail.com with ESMTPSA id p14sm403320edr.23.2020.07.08.13.03.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Jul 2020 13:03:31 -0700 (PDT) Sender: Floris Bruynooghe Received: (nullmailer pid 115071 invoked by uid 1000); Wed, 08 Jul 2020 20:03:30 -0000 From: Floris Bruynooghe To: David Bremner , notmuch@notmuchmail.org Subject: Re: [RFC PATCH] lib: document new database_open API In-Reply-To: <87h7unkyen.fsf@tethera.net> References: <20200703134338.3311659-1-david@tethera.net> <87eeprxn3m.fsf@powell.devork.be> <87h7unkyen.fsf@tethera.net> Date: Wed, 08 Jul 2020 22:03:30 +0200 Message-ID: <87wo3dbwq5.fsf@powell.devork.be> MIME-Version: 1.0 Message-ID-Hash: PVFNY2MFN7H6SNF5YJR2KFTTJI37EMKJ X-Message-ID-Hash: PVFNY2MFN7H6SNF5YJR2KFTTJI37EMKJ X-MailFrom: floris.bruynooghe@gmail.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-notmuch.notmuchmail.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.1 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Help: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=fail (body hash did not verify) header.d=gmail.com header.s=20161025 header.b=iZvQFvJ6; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 144.217.243.247 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Spam-Score: 1.53 X-TUID: Q2ELvdllbG0o On Sat 04 Jul 2020 at 14:01 -0300, David Bremner wrote: > Floris Bruynooghe 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