Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id 7824E6DE09ED for ; Sat, 23 Jan 2016 07:00:11 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -0.309 X-Spam-Level: X-Spam-Status: No, score=-0.309 tagged_above=-999 required=5 tests=[AWL=0.242, RP_MATCHES_RCVD=-0.55, 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 gfkqn2UwiJyU for ; Sat, 23 Jan 2016 07:00:09 -0800 (PST) Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) by arlo.cworth.org (Postfix) with ESMTPS id 785C96DE091B for ; Sat, 23 Jan 2016 07:00:09 -0800 (PST) Received: from remotemail by fethera.tethera.net with local (Exim 4.84) (envelope-from ) id 1aMzf0-00015j-44 for notmuch@notmuchmail.org; Sat, 23 Jan 2016 09:59:30 -0500 Received: (nullmailer pid 4038 invoked by uid 1000); Sat, 23 Jan 2016 15:00:06 -0000 From: David Bremner To: notmuch@notmuchmail.org Subject: library config API Date: Sat, 23 Jan 2016 10:59:53 -0400 Message-Id: <1453561198-2893-1-git-send-email-david@tethera.net> X-Mailer: git-send-email 2.6.4 X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.20 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: Sat, 23 Jan 2016 15:00:11 -0000 This is the third revision of this series, and I think the first two patches are ready for serious review. Some things to think about with respect to the CLI patches - Should we include a "version" line at the top of the dump? Currently this is unused, but that depends on the format being auto detectable? - Should config info be included by default in the dump output? - Should we restore config info by default? - How about the usual bikeshedding about argument names? I'm loath to spend time on docs until after this. I guess a global question is what do we need this API / feature for. I can think of three things so far - tag aliases [1] - making the location of the mail tree configurable (i.e. allowing mailtree and database to live in different places). - Some things like excludes and maildir synchonization are natural to have in common between all clients. A natural question is why not provide a library API to access .notmuch-config? Having a plain text representation of the configuration (without the extra step of dumping it) is obviously attractive, but - We would need to build some locking / synchronization to prevent various clients and interactive text editors from stomping on each other. This we have for free by using xapian metadata. - We'd also have to provide our own key/value datastructure. - At least for tag aliases, I think there is a second argument that this information part of the users tagging state, and should be backed up as part of the normal dump / restore process. [1]: id:87mvsd7cxr.fsf@zancas.localnet