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 156C26DE0243 for ; Wed, 1 Jun 2016 07:14:10 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -0.018 X-Spam-Level: X-Spam-Status: No, score=-0.018 tagged_above=-999 required=5 tests=[AWL=-0.018] 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 Tj5EsRK_gCD4 for ; Wed, 1 Jun 2016 07:14:02 -0700 (PDT) Received: from che.mayfirst.org (che.mayfirst.org [162.247.75.118]) by arlo.cworth.org (Postfix) with ESMTP id 22DBA6DE01D0 for ; Wed, 1 Jun 2016 07:14:02 -0700 (PDT) Received: from fifthhorseman.net (unknown [38.109.115.130]) by che.mayfirst.org (Postfix) with ESMTPSA id 48C73F98B; Wed, 1 Jun 2016 10:13:57 -0400 (EDT) Received: by fifthhorseman.net (Postfix, from userid 1000) id 0808D2022D; Wed, 1 Jun 2016 10:13:57 -0400 (EDT) From: Daniel Kahn Gillmor To: David Bremner , notmuch@notmuchmail.org Subject: Re: [RFC2 Patch 5/5] lib: iterator API for message properties In-Reply-To: <87pos1u14p.fsf@alice.fifthhorseman.net> References: <1463927339-5441-1-git-send-email-david@tethera.net> <1464608999-14774-1-git-send-email-david@tethera.net> <1464608999-14774-6-git-send-email-david@tethera.net> <8760tthfuy.fsf@zancas.localnet> <87pos1u14p.fsf@alice.fifthhorseman.net> User-Agent: Notmuch/0.22+16~g87b7bd4 (http://notmuchmail.org) Emacs/24.5.1 (x86_64-pc-linux-gnu) Date: Wed, 01 Jun 2016 10:13:56 -0400 Message-ID: <87eg8ht2sb.fsf@alice.fifthhorseman.net> MIME-Version: 1.0 Content-Type: text/plain 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: Wed, 01 Jun 2016 14:14:10 -0000 On Tue 2016-05-31 21:52:06 -0400, Daniel Kahn Gillmor wrote: > Thanks for working on this, David! I think this is going to be really > useful! just thinking about this series this morning in a bigger-picture way, i figure it's worth asking the hard questions now rather than later -- maybe the answers are obvious, and we just need to write them down. Please accept these questions in the spirit of supportive inquiry :) Here goes: do we actually need this abstraction? If we're aiming to build specific new features (the two i'm thinking of are cryptographic-session-keys and reference-adjustments), couldn't we implement those features explicitly in xapian with their own special prefix, rather than treating them as a generic "property"? If we make a generic "property", that seems likely to be exposed to the user, who can then manipulate them directly externally from notmuch. We already have a bit of an uncomfortable fit with tags and special flags (encrypted, signed, attachment, etc), where some are expected to be set and cleared automagically and some are expected to be manipulated directly by the user. Are we setting ourselves up for more of the same, or is there a principled way that a user can know which properties it's kosher for them to set and clear, and which ones they should leave alone? If we add new specific features, we could potentially augment the dump format explicitly for them, without having the property abstraction. We already have some explicit features for each message (subject, from, to, attachment, mimetype, thread id, etc), and most of them are derived from the message itself, with the hope that it could be re-derived given just the message body. Is there a distinction between properties that can be derived from the message body and properties that need to be additionally derived from some other data? --dkg