From 4a30fdc857d5f84e8cda736afb617798654f5225 Mon Sep 17 00:00:00 2001 From: David Bremner Date: Thu, 2 Jun 2016 07:04:31 +2100 Subject: [PATCH] Re: [RFC2 Patch 5/5] lib: iterator API for message properties --- 8a/4216e041ed6173a576346d5ef910cedd4c13e2 | 102 ++++++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100644 8a/4216e041ed6173a576346d5ef910cedd4c13e2 diff --git a/8a/4216e041ed6173a576346d5ef910cedd4c13e2 b/8a/4216e041ed6173a576346d5ef910cedd4c13e2 new file mode 100644 index 000000000..ec81964b9 --- /dev/null +++ b/8a/4216e041ed6173a576346d5ef910cedd4c13e2 @@ -0,0 +1,102 @@ +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 27F916DE0231 + for ; Wed, 1 Jun 2016 03:04:55 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at cworth.org +X-Spam-Flag: NO +X-Spam-Score: -0.012 +X-Spam-Level: +X-Spam-Status: No, score=-0.012 tagged_above=-999 required=5 + tests=[AWL=-0.001, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01] + 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 5FKd0qDIVGWf for ; + Wed, 1 Jun 2016 03:04:46 -0700 (PDT) +Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) + by arlo.cworth.org (Postfix) with ESMTPS id BE2F66DE00D3 + for ; Wed, 1 Jun 2016 03:04:46 -0700 (PDT) +Received: from remotemail by fethera.tethera.net with local (Exim 4.84) + (envelope-from ) + id 1b830q-0000ap-Pk; Wed, 01 Jun 2016 06:04:32 -0400 +Received: (nullmailer pid 17286 invoked by uid 1000); + Wed, 01 Jun 2016 10:04:41 -0000 +From: David Bremner +To: Daniel Kahn Gillmor , 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+28~gb9bf3f4 (http://notmuchmail.org) Emacs/24.5.1 + (x86_64-pc-linux-gnu) +Date: Wed, 01 Jun 2016 07:04:31 -0300 +Message-ID: <8737oxgr80.fsf@zancas.localnet> +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.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 10:04:55 -0000 + +--=-=-= +Content-Type: text/plain + +Daniel Kahn Gillmor writes: + +> The other concern is our conception of how properties are unset/removed, +> right? +> +> With tags, it's possible to include -blah to remove the tag "blah". how +> do we remove/clear/overwrite these tags? what about using +key=val or +> -key=val to set/unset certain key/value combinations, and a value-less +> key= to remove all values matching a given key? +> + +msg-id -blah is only possible if using notmuch-tag; notmuch restore takes a +strict subset of the input format for "notmuch tag --batch". + +I'm not sure if generic property manipulation from the CLI is mandatory, +or at least I'm not sure it's a blocker for including the feature. +If/when we do decide to support it, I'm not sure if should be wedged +into notmuch-tag, or rather added to a new "notmuch-property" +subcommand. Such a subcommand could take additional options and/or have +a richer syntax than used in the dump file. + +I can imagine initial support with just an API, and some python +bindings. This could already be used by some reference manipulation UI. +The dump-restore support is more part of the backend in my mind, because +we don't want people to think they've backup their data when they +haven't. + +--=-=-= +Content-Type: application/pgp-signature; name="signature.asc" + +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1 + +iQGcBAEBCAAGBQJXTrMvAAoJEPIClx2kp54sjNEMAIlkT12TddAfEtgmFP1BZByg +Z9zJbpLHIzRTuUW8jcI0tsoV5H1DfVTl6tZJlV8R4wXobj9ammc1gxLWiFuvNqH6 +SsBEQ1Fg5yL22JHcsg9THBd5+N4s5pDl+Si+Be6e99xSsa05DB8MyQB0kZA2MAJH +UuwYZRurTMsLadZxb4jbn++f/ogSwHLvpWJNOeeQhQycqG/caQBPSIIS/CcCH5Pj +cdCwXL7bNOS77UIqtBTxkz/9iFg9hnbBRR0u45CrMvnVzOJm/NKOIAPZgqg58Soz +jowpyjlerX9YWwP0EpMgnWkO9/jw7BJbV5ZQAoez1WxlTUxVe+2q391BAh+In8CT +dL2F9ZBBru+MwW/bP06yRl6fMu08HqIzw2T2qgO42c8u6xpXCSlreOge17q9D2ZP +XI3+E0h1EcwYd4bh1cEIQlR4qOc52b99FJnYaUAyrQ7CMY/vr4k4AQlL9Q1K/CBk +PjL416LdDsFamNT6e7N6i1Kmula0np7zLWRtARieLA== +=PJ6E +-----END PGP SIGNATURE----- +--=-=-=-- -- 2.26.2