From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id 3F0496DE092B for ; Thu, 21 Nov 2019 18:51:18 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -1.642 X-Spam-Level: X-Spam-Status: No, score=-1.642 tagged_above=-999 required=5 tests=[AWL=0.859, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id dE1v0nvoOU1L for ; Thu, 21 Nov 2019 18:51:16 -0800 (PST) Received: from che.mayfirst.org (che.mayfirst.org [162.247.75.118]) by arlo.cworth.org (Postfix) with ESMTPS id 83ED06DE096A for ; Thu, 21 Nov 2019 18:51:16 -0800 (PST) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/simple; d=fifthhorseman.net; i=@fifthhorseman.net; q=dns/txt; s=2019; t=1574391074; h=from : to : subject : in-reply-to : references : date : message-id : mime-version : content-type : from; bh=CHkHAk2joCGvS3VKBGel7PIFD0Z0vbLE2FTcwEoZ/Z8=; b=kCH7HXN35LgBlGq9vjbvqB2VDDhiCDUFWR6ji6sXIgBVxsXKSWlNzedF mr5j7njkZ8Ae6E6DO86SFjn4cjtzAA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=fifthhorseman.net; i=@fifthhorseman.net; q=dns/txt; s=2019rsa; t=1574391074; h=from : to : subject : in-reply-to : references : date : message-id : mime-version : content-type : from; bh=CHkHAk2joCGvS3VKBGel7PIFD0Z0vbLE2FTcwEoZ/Z8=; b=eNd0902hy0ji7akcj1t0Jl2A+hjPsdC4yff/AwwBHEQMio1EPQUnMDlh KNYUer1UL/74cK8AcmWGdunjzgY3GzTuf6QbVNZBGqd4jnjOYPJoRx+FKh 3CjDr8I2ihs3d8+6bE4u7/guYRbrgh0mktvZ1b249fVe6zLMSyA2ORoV+/ s88FhFTRwBypXbvLrERXDFJrwIeKYyVXvkMY3N8BPseryuddg/nJs+2iUB 1Nulw4N8lDC0jHukb0H6stEekBz1jKZEZzD67jDerkKP5AIWu48Kwq5NPp py+yMAJRkz8t71jwwd4/ybZMDexuQVMFnRUiGjXxLTUlNPNFTk+OzA== Received: from fifthhorseman.net (dhcp-9e77.meeting.ietf.org [31.133.158.119]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by che.mayfirst.org (Postfix) with ESMTPSA id 78ABDF9B2; Thu, 21 Nov 2019 21:51:12 -0500 (EST) Received: by fifthhorseman.net (Postfix, from userid 1000) id 0A543204F6; Fri, 22 Nov 2019 10:43:41 +0800 (+08) From: Daniel Kahn Gillmor To: Tomi Ollila , notmuch@notmuchmail.org Subject: moving the config into the database [was: Re: [PATCH] Display extra headers for emacs-mua - db config option] In-Reply-To: References: <20191116162723.18343-1-johan.parin@gmail.com> <875zjd8lev.fsf@tethera.net> <875zjdj9jz.fsf@fifthhorseman.net> Autocrypt: addr=dkg@fifthhorseman.net; prefer-encrypt=mutual; keydata= mDMEXEK/AhYJKwYBBAHaRw8BAQdAr/gSROcn+6m8ijTN0DV9AahoHGafy52RRkhCZVwxhEe0K0Rh bmllbCBLYWhuIEdpbGxtb3IgPGRrZ0BmaWZ0aGhvcnNlbWFuLm5ldD6ImQQTFggAQQIbAQUJA8Jn AAULCQgHAgYVCgkICwIEFgIDAQIeAQIXgBYhBMS8Lds4zOlkhevpwvIGkReQOOXGBQJcQsbzAhkB AAoJEPIGkReQOOXG4fkBAO1joRxqAZY57PjdzGieXLpluk9RkWa3ufkt3YUVEpH/AP9c+pgIxtyW +FwMQRjlqljuj8amdN4zuEqaCy4hhz/1DbgzBFxCv4sWCSsGAQQB2kcPAQEHQERSZxSPmgtdw6nN u7uxY7bzb9TnPrGAOp9kClBLRwGfiPUEGBYIACYWIQTEvC3bOMzpZIXr6cLyBpEXkDjlxgUCXEK/ iwIbAgUJAeEzgACBCRDyBpEXkDjlxnYgBBkWCAAdFiEEyQ5tNiAKG5IqFQnndhgZZSmuX/gFAlxC v4sACgkQdhgZZSmuX/iVWgD/fCU4ONzgy8w8UCHGmrmIZfDvdhg512NIBfx+Mz9ls5kA/Rq97vz4 z48MFuBdCuu0W/fVqVjnY7LN5n+CQJwGC0MIA7QA/RyY7Sz2gFIOcrns0RpoHr+3WI+won3xCD8+ sVXSHZvCAP98HCjDnw/b0lGuCR7coTXKLIM44/LFWgXAdZjm1wjODbg4BFxCv50SCisGAQQBl1UB BQEBB0BG4iXnHX/fs35NWKMWQTQoRI7oiAUt0wJHFFJbomxXbAMBCAeIfgQYFggAJhYhBMS8Lds4 zOlkhevpwvIGkReQOOXGBQJcQr+dAhsMBQkB4TOAAAoJEPIGkReQOOXGe/cBAPlek5d9xzcXUn/D kY6jKmxe26CTws3ZkbK6Aa5Ey/qKAP0VuPQSCRxA7RKfcB/XrEphfUFkraL06Xn/xGwJ+D0hCw== Date: Fri, 22 Nov 2019 10:43:40 +0800 Message-ID: <87o8x4iqar.fsf@fifthhorseman.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Nov 2019 02:51:18 -0000 --=-=-= Content-Type: text/plain On Thu 2019-11-21 23:38:06 +0200, Tomi Ollila wrote: > How can library open the database if it doesn't read the config file > -- the config file defines where database is located =D The *only* thing i think worth keeping in the config file is ultimately the location of the database, though i would eventually prefer that we introduce a NOTMUCH_DATABASE env var, and use it if we can't find a config. This is the moral equivalent of the NOTMUCH_CONFIG env var, as far as i'm concerned, but more rationalized. and *eventually eventually* drop the config file entirely, yes. > If the library can somehow guess the location of the database without > reading the config file ;D I think dumping -- editing -- restoring > the database is tolerable solution -- provided it is clearly documented > for people like me who wants to edit configuration files w/ text > editor(*), Better than documenting, i'd be happy if we would add a "notmuch config edit" subcommand, which handles the above sequence for you, invoking $EDITOR at the appropriate time. The only caveat i see there is if the end user wants to inject comments in the config file, which would then be stripped out in between these invocations. perhaps someone who finds these comments in config files super important could propose a way to stash them in the db and recover them during "notmuch config edit" as well :) > (+) if we dropped the configuration file, then notmuch, and library could > open database from ~/mail/notmuch/ by default, or from location pointed > by e.g. NOTMUCH_DATABASE_DIR -- as an additional benefit(?) notmuch > would pollute user's $HOME by one file less -- the `.notmuch-config`. You named the env var differently than i did, but i'd be happy to go with your name, since it seems we arrived at the same design independently :) --dkg --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEARYIAB0WIQTJDm02IAobkioVCed2GBllKa5f+AUCXddLXAAKCRB2GBllKa5f +L95AQCGXFk6iiPU3fkzKC33OzMbZmOs5EsmFrv3ifFMuJE+MgD/c+VsoPrI/RiE HLw0QvjlfxGFWDDbFne4whu2sHkgAA4= =YNcY -----END PGP SIGNATURE----- --=-=-=--