unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: David Bremner <david@tethera.net>
To: Tomi Ollila <tomi.ollila@iki.fi>,
	Daniel Kahn Gillmor <dkg@fifthhorseman.net>,
	notmuch@notmuchmail.org
Subject: Re: v3 of message properties patches
Date: Wed, 21 Sep 2016 18:21:15 -0300	[thread overview]
Message-ID: <87intpdk50.fsf@zancas.localnet> (raw)
In-Reply-To: <m2h999z9nm.fsf@guru.guru-group.fi>

Tomi Ollila <tomi.ollila@iki.fi> writes:
>
> I am happy with merging the series, just amend the sepErates
> (and possibly spcs->tab after $(dir)/string-map.c in -3-)
>
> I looked through the code and did not see anything that should broke
> anything. As Daniel has been using it I can slack off from testing it myself :D
>
> Tomi

I have merged this series, amended as follows:

diff --git a/doc/man1/notmuch-dump.rst b/doc/man1/notmuch-dump.rst
index 29964da..5857027 100644
--- a/doc/man1/notmuch-dump.rst
+++ b/doc/man1/notmuch-dump.rst
@@ -84,7 +84,7 @@ Supported options for **dump** include
       **properties**
 
 	Output per-message (key,value) metadata.  Each line starts
-	with "#= ", followed by a message id, and a space seperated
+	with "#= ", followed by a message id, and a space separated
 	list of key=value pairs.  pair.  Ids, keys and values are hex
 	encoded if needed.
 
diff --git a/doc/man1/notmuch-restore.rst b/doc/man1/notmuch-restore.rst
index ebdb3ff..c681fa2 100644
--- a/doc/man1/notmuch-restore.rst
+++ b/doc/man1/notmuch-restore.rst
@@ -63,7 +63,7 @@ Supported options for **restore** include
 	**properties**
 
 	  Output per-message (key,value) metadata.  Each line starts
-	  with "#= ", followed by a message id, and a space seperated
+	  with "#= ", followed by a message id, and a space separated
 	  list of key=value pairs.  pair.  Ids, keys and values are
 	  hex encoded if needed.
 
diff --git a/doc/man7/notmuch-search-terms.rst b/doc/man7/notmuch-search-terms.rst
index a85d94b..de93d73 100644
--- a/doc/man7/notmuch-search-terms.rst
+++ b/doc/man7/notmuch-search-terms.rst
@@ -58,7 +58,7 @@ indicate user-supplied values):
 
 -  query:<name>
 
--  has:<key>=<value>
+-  property:<key>=<value>
 
 The **from:** prefix is used to match the name or address of the sender
 of an email message.
@@ -141,7 +141,7 @@ queries added with **notmuch-config(1)**. Named queries are only
 available if notmuch is built with **Xapian Field Processors** (see
 below).
 
-The **has:** prefix searches for messages with a particular
+The **property:** prefix searches for messages with a particular
 <key>=<value> property pair. Properties are used internally by notmuch
 (and extensions) to add metadata to messages. A given key can be
 present on a given message with several different values.
@@ -224,7 +224,7 @@ exact matches like "tag:inbox"  or **probabilistic**, supporting a more flexible
 
 
 Boolean
-   **tag:**, **id:**, **thread:**, **folder:**, **path:**, **has:**
+   **tag:**, **id:**, **thread:**, **folder:**, **path:**, **property:**
 Probabilistic
    **from:**, **to:**, **subject:**, **attachment:**, **mimetype:**
 
diff --git a/lib/Makefile.local b/lib/Makefile.local
index c012ed1..3d1030a 100644
--- a/lib/Makefile.local
+++ b/lib/Makefile.local
@@ -40,7 +40,7 @@ libnotmuch_c_srcs =		\
 	$(dir)/messages.c	\
 	$(dir)/sha1.c		\
 	$(dir)/built-with.c	\
-	$(dir)/string-map.c    \
+	$(dir)/string-map.c	\
 	$(dir)/tags.c
 
 libnotmuch_cxx_srcs =		\
diff --git a/lib/database.cc b/lib/database.cc
index d3e2e0e..392e8b2 100644
--- a/lib/database.cc
+++ b/lib/database.cc
@@ -97,7 +97,7 @@ typedef struct {
  *		        STRING is the name of a file within that
  *		        directory for this mail message.
  *
- *      has:       Has a property with key=value
+ *      property:       Has a property with key=value
  *                 FIXME: if no = is present, should match on any value
  *
  *    A mail document also has four values:
@@ -254,7 +254,6 @@ static prefix_t BOOLEAN_PREFIX_INTERNAL[] = {
     { "directory",		"XDIRECTORY" },
     { "file-direntry",		"XFDIRENTRY" },
     { "directory-direntry",	"XDDIRENTRY" },
-    { "property",               "XPROPERTY"  },
 };
 
 static prefix_t BOOLEAN_PREFIX_EXTERNAL[] = {
@@ -263,7 +262,7 @@ static prefix_t BOOLEAN_PREFIX_EXTERNAL[] = {
     { "is",			"K" },
     { "id",			"Q" },
     { "path",			"P" },
-    { "has",			"XPROPERTY" },
+    { "property",		"XPROPERTY" },
     /*
      * Unconditionally add ':' to reduce potential ambiguity with
      * overlapping prefixes and/or terms that start with capital
diff --git a/test/T610-message-property.sh b/test/T610-message-property.sh
index ee7910b..65ff19d 100755
--- a/test/T610-message-property.sh
+++ b/test/T610-message-property.sh
@@ -237,12 +237,12 @@ notmuch restore < BEFORE2
 notmuch dump | grep '^#=' > OUTPUT
 test_expect_equal_file PROPERTIES OUTPUT
 
-test_begin_subtest "test 'has:' queries: empty"
-notmuch search has:testkey1=charles > OUTPUT
+test_begin_subtest "test 'property:' queries: empty"
+notmuch search property:testkey1=charles > OUTPUT
 test_expect_equal_file /dev/null OUTPUT
 
-test_begin_subtest "test 'has:' queries: single message"
-notmuch search --output=messages has:testkey1=alice > OUTPUT
+test_begin_subtest "test 'property:' queries: single message"
+notmuch search --output=messages property:testkey1=alice > OUTPUT
 cat <<EOF >EXPECTED
 id:4EFC743A.3060609@april.org
 EOF

      reply	other threads:[~2016-09-21 21:21 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-06 13:52 v3 of message properties patches David Bremner
2016-08-06 13:52 ` [PATCH 1/9] lib: read "property" terms from messages David Bremner
2016-08-06 13:52 ` [PATCH 2/9] lib: private string map (associative array) API David Bremner
2016-08-06 13:52 ` [PATCH 3/9] lib: basic message-property API David Bremner
2016-08-06 13:52 ` [PATCH 4/9] lib: extend private string map API with iterators David Bremner
2016-08-06 13:52 ` [PATCH 5/9] lib: iterator API for message properties David Bremner
2016-08-06 13:52 ` [PATCH 6/9] CLI: refactor dumping of tags David Bremner
2016-08-06 13:52 ` [PATCH 7/9] CLI: add properties to dump output David Bremner
2016-08-06 13:52 ` [PATCH 8/9] cli: optionally restore message properties from dump file David Bremner
2016-08-06 13:52 ` [PATCH 9/9] add has: query prefix to search for specific properties David Bremner
2016-08-06 14:18   ` David Bremner
2016-08-13  9:38     ` Jani Nikula
2016-08-13 11:31       ` David Bremner
2016-08-18  8:14       ` [PATCH] lib: reword comment about XFOLDER: prefix David Bremner
2016-08-18  8:18         ` David Bremner
2016-08-19 12:18           ` David Bremner
2016-08-13 19:00   ` [PATCH 9/9] add has: query prefix to search for specific properties Jameson Graef Rollins
2016-08-13 23:14     ` David Bremner
2016-09-20 21:56 ` v3 of message properties patches Daniel Kahn Gillmor
2016-09-21 12:01   ` David Bremner
2016-09-21 13:04     ` Tomi Ollila
2016-09-21 21:21       ` David Bremner [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87intpdk50.fsf@zancas.localnet \
    --to=david@tethera.net \
    --cc=dkg@fifthhorseman.net \
    --cc=notmuch@notmuchmail.org \
    --cc=tomi.ollila@iki.fi \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).