Re: [PATCH 9/9] add has: query prefix to search for specific properties
authorJani Nikula <jani@nikula.org>
Sat, 13 Aug 2016 09:38:40 +0000 (12:38 +0300)
committerW. Trevor King <wking@tremily.us>
Sat, 20 Aug 2016 23:22:24 +0000 (16:22 -0700)
4a/99d7c633e353f14791aea139612fb79b9e58bf [new file with mode: 0644]

diff --git a/4a/99d7c633e353f14791aea139612fb79b9e58bf b/4a/99d7c633e353f14791aea139612fb79b9e58bf
new file mode 100644 (file)
index 0000000..f0f37d1
--- /dev/null
@@ -0,0 +1,122 @@
+Return-Path: <jani@nikula.org>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by arlo.cworth.org (Postfix) with ESMTP id 2AB606DE25E8\r
+ for <notmuch@notmuchmail.org>; Sat, 13 Aug 2016 02:40:35 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at cworth.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0.329\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0.329 tagged_above=-999 required=5 tests=[AWL=1.049, \r
+ DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_LOW=-0.7,\r
+ RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01] autolearn=disabled\r
+Received: from arlo.cworth.org ([127.0.0.1])\r
+ by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id MMojALNfNF22 for <notmuch@notmuchmail.org>;\r
+ Sat, 13 Aug 2016 02:40:18 -0700 (PDT)\r
+Received: from mail-wm0-f67.google.com (mail-wm0-f67.google.com\r
+ [74.125.82.67]) by arlo.cworth.org (Postfix) with ESMTPS id 238CE6DE3521 for\r
+ <notmuch@notmuchmail.org>; Sat, 13 Aug 2016 02:40:07 -0700 (PDT)\r
+Received: by mail-wm0-f67.google.com with SMTP id q128so1664566wma.1\r
+ for <notmuch@notmuchmail.org>; Sat, 13 Aug 2016 02:40:06 -0700 (PDT)\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
+ d=nikula-org.20150623.gappssmtp.com; s=20150623;\r
+ h=from:to:cc:subject:in-reply-to:references:date:message-id\r
+ :mime-version; bh=Fl3JV4B22MQp5cJ8BRS3qTXUm2OLLCjSPFIPmwCcEWc=;\r
+ b=OEMPgQz7zhN77nBuzQ41UlGlhmEuk/MC904s24fGw64zuAIP4/U1aPaa0xPqe8/Be6\r
+ BvYM1NpxMV6TIo7ychao7QaRtxR8C6PSSzSN/cMVcapQstzT1IxHhZh8Z0xUSeh8MxWh\r
+ ddWkHEA9b3zyQ0BdqZ3hNQ3M5/Hea4CdmoQo2iLvOIC9fftMmAQuqj3KgROszgu4E/w2\r
+ kRGHOqiS0M4bfsGUZ2fh0YjWXutHkaB5Cvy1sHj5Fqn41F7eywxwHGNNg5Kz+ZNWRMHR\r
+ k2qsU1/S5Cf1yhdkA+ttQT9AfrLvCPj7gduLXpftt5Y5mj61MB3BFe4PU57avCFqN/LO\r
+ l2dw==\r
+X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
+ d=1e100.net; s=20130820;\r
+ h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date\r
+ :message-id:mime-version;\r
+ bh=Fl3JV4B22MQp5cJ8BRS3qTXUm2OLLCjSPFIPmwCcEWc=;\r
+ b=TgOvS4ezExAG41P+kvGMdK109kFTIV5GZMjh0vXIfi319hRh8DZgr1sz+cSyPqaFGQ\r
+ r5hsde7uMGWbNjV1DrqKuKqvyH/UwaPUwCqBVF5jdHWZh02C0vDVS50J2ylO8dePB/3S\r
+ DOtg0SmYatzRP7q3MpBBjtHg8rpFp+NN6rdC+SjSaQ6cCG4J5jCysutNXY0P/tfOnAq3\r
+ LflVpweZDPZGK3VWSDif3XeLKtf/TcMFLdfRjtnzPR+BKbXwUVHlgtmiOhki7BUKoxvG\r
+ BQQvVFRgb7bC0xUYhU2c8JIaBtTkBrSTeprvC9CN6ucSTswdyEwbatc02vvqw8givFCb\r
+ DaLQ==\r
+X-Gm-Message-State:\r
+ AEkoouskNEVRZ5jqy3jvkT4u53ZQybT3fMu/V7W9CFxLzGYpUXqOi6YmSsX6eRB68plzvA==\r
+X-Received: by 10.194.27.202 with SMTP id v10mr22752413wjg.140.1471081204801; \r
+ Sat, 13 Aug 2016 02:40:04 -0700 (PDT)\r
+Received: from localhost (dsl-hkibrasgw2-58c368-70.dhcp.inet.fi.\r
+ [88.195.104.70])\r
+ by smtp.gmail.com with ESMTPSA id d80sm6362817wmd.14.2016.08.13.02.40.03\r
+ (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\r
+ Sat, 13 Aug 2016 02:40:03 -0700 (PDT)\r
+From: Jani Nikula <jani@nikula.org>\r
+To: David Bremner <david@tethera.net>, notmuch@notmuchmail.org\r
+Cc: Daniel Kahn Gillmor <dkg@fifthhorseman.net>\r
+Subject: Re: [PATCH 9/9] add has: query prefix to search for specific\r
+ properties\r
+In-Reply-To: <87d1lm7zg2.fsf@maritornes.cs.unb.ca>\r
+References: <1470491559-3946-1-git-send-email-david@tethera.net>\r
+ <1470491559-3946-10-git-send-email-david@tethera.net>\r
+ <87d1lm7zg2.fsf@maritornes.cs.unb.ca>\r
+Date: Sat, 13 Aug 2016 12:38:40 +0300\r
+Message-ID: <87vaz580v3.fsf@nikula.org>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.20\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <https://notmuchmail.org/mailman/options/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch/>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <https://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Sat, 13 Aug 2016 09:40:35 -0000\r
+\r
+On Sat, 06 Aug 2016, David Bremner <david@tethera.net> wrote:\r
+> David Bremner <david@tethera.net> writes:\r
+>\r
+>>  \r
+>> +The **has:** prefix searches for messages with a particular\r
+>> +<key>=<value> property pair. Properties are used internally by notmuch\r
+>> +(and extensions) to add metadata to messages. A given key can be\r
+>> +present on a given message with several different values.\r
+>> +\r
+>\r
+> I probably should have added to the commit message that this\r
+> documentation is intentionally minimal, because it's not intended for\r
+> people creating properties; that should go in API documentation, I think.\r
+>\r
+>\r
+>> +    { "has",                       "XPROPERTY" },\r
+>>      /*\r
+>>       * Without the ":", since this is a multi-letter prefix, Xapian\r
+>>       * will add a colon itself if the first letter of the path\r
+>\r
+> I don't really understand the comment on the next line (since it seems\r
+> that no : is added to XPROPERTY by Xapian), but I guess we should\r
+> probably be consistent. Maybe Jani can explain the comment?\r
+\r
+My recollection is vague, but it has to do with user-defined prefixes\r
+(XSOMETHING) and terms beginning with uppercase letters. I think it\r
+would possibly be useful (mandatory?) to append ":" at the end of\r
+XPROPERTY, if it's possible we'll have properties beginning with\r
+uppercase letters.\r
+\r
+Quoting https://xapian.org/docs/omega/termprefixes.html\r
+\r
+"""\r
+X starts a multi-capital letter user-defined prefix. If you want a\r
+prefix for something without a standard prefix, you create your own\r
+starting with an X (e.g. XSHOESIZE). The prefix ends with the first\r
+non-capital. If the term you're prefixing starts with a capital, add a\r
+":" between prefix and term to resolve ambiguity about where the prefix\r
+ends and the term begins.\r
+"""\r
+\r
+BR,\r
+Jani.\r