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
signature.asc
Description: PGP signature
_______________________________________________ notmuch mailing list notmuch@notmuchmail.org https://notmuchmail.org/mailman/listinfo/notmuch