--- /dev/null
+Return-Path: <bremner@tethera.net>\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 DD6886DE092B\r
+ for <notmuch@notmuchmail.org>; Sat, 30 Apr 2016 18:25:03 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at cworth.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.015\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.015 tagged_above=-999 required=5\r
+ tests=[AWL=-0.004, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01]\r
+ 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 EFb3i-5C0av6 for <notmuch@notmuchmail.org>;\r
+ Sat, 30 Apr 2016 18:24:56 -0700 (PDT)\r
+Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197])\r
+ by arlo.cworth.org (Postfix) with ESMTPS id EC8EE6DE025F\r
+ for <notmuch@notmuchmail.org>; Sat, 30 Apr 2016 18:24:47 -0700 (PDT)\r
+Received: from remotemail by fethera.tethera.net with local (Exim 4.84)\r
+ (envelope-from <bremner@tethera.net>) id 1awg7k-0006bD-Ms\r
+ for notmuch@notmuchmail.org; Sat, 30 Apr 2016 21:24:40 -0400\r
+Received: (nullmailer pid 29936 invoked by uid 1000);\r
+ Sun, 01 May 2016 01:24:43 -0000\r
+From: David Bremner <david@tethera.net>\r
+To: notmuch@notmuchmail.org\r
+Subject: v3 of libconfig / single argument date / named query patches\r
+Date: Sat, 30 Apr 2016 22:24:28 -0300\r
+Message-Id: <1462065879-29860-1-git-send-email-david@tethera.net>\r
+X-Mailer: git-send-email 2.8.0.rc3\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: Sun, 01 May 2016 01:25:04 -0000\r
+\r
+The main difference here is responding to Tomi's comments about\r
+"options" and rebasing against master. Rebasing was surprisingly\r
+messy, so I might have botched something up.\r
+\r
+One thing to discuss is the dump/restore format. dkg has discussed\r
+attaching some non-tag metadata to messages, so we may want to make\r
+sure the changes are general enough to handle that. If desired we\r
+could add more "pseudo-comments" with #x where x is not @ to introduce\r
+that metadata. I'm not sure how valuable this upward compatibility is;\r
+I guess it would mainly allow us not maintain a third dump format.\r
+\r
+The first 3 patches are usable on their own.\r
+\r
+Interdiff follows.\r
+\r
+diff --git a/doc/man1/notmuch-config.rst b/doc/man1/notmuch-config.rst\r
+index c3470a8..5a517eb 100644\r
+--- a/doc/man1/notmuch-config.rst\r
++++ b/doc/man1/notmuch-config.rst\r
+@@ -132,9 +132,9 @@ The available configuration items are described below.\r
+ \r
+ Default: ``gpg``.\r
+ \r
+- **options.<name>**\r
++ **built_with.<name>**\r
+ \r
+- Compile time option <name>. Current possibilities include\r
++ Compile time feature <name>. Current possibilities include\r
+ "compact" (see **notmuch-compact(1)**)\r
+ and "field_processor" (see **notmuch-search-terms(7)**).\r
+ \r
+diff --git a/doc/man7/notmuch-search-terms.rst b/doc/man7/notmuch-search-terms.rst\r
+index 7474f53..223031b 100644\r
+--- a/doc/man7/notmuch-search-terms.rst\r
++++ b/doc/man7/notmuch-search-terms.rst\r
+@@ -387,7 +387,7 @@ notmuch was built against a sufficiently recent version of Xapian by running\r
+ \r
+ ::\r
+ \r
+- % notmuch config get options.field_processor\r
++ % notmuch config get built_with.field_processor\r
+ \r
+ Currently the following features require field processor support:\r
+ \r
+diff --git a/lib/Makefile.local b/lib/Makefile.local\r
+index fab1242..35caa3e 100644\r
+--- a/lib/Makefile.local\r
++++ b/lib/Makefile.local\r
+@@ -39,7 +39,7 @@ libnotmuch_c_srcs = \\r
+ $(dir)/message-file.c \\r
+ $(dir)/messages.c \\r
+ $(dir)/sha1.c \\r
+- $(dir)/options.c \\r
++ $(dir)/built-with.c \\r
+ $(dir)/tags.c\r
+ \r
+ libnotmuch_cxx_srcs = \\r
+diff --git a/lib/options.c b/lib/built-with.c\r
+similarity index 69%\r
+rename from lib/options.c\r
+rename to lib/built-with.c\r
+index 4e15d92..b619bed 100644\r
+--- a/lib/options.c\r
++++ b/lib/built-with.c\r
+@@ -22,28 +22,11 @@\r
+ #include "notmuch-private.h"\r
+ \r
+ notmuch_bool_t\r
+-notmuch_options_present (notmuch_option_t mask)\r
+-{\r
+- notmuch_option_t present = 0;\r
+-\r
+-#if HAVE_XAPIAN_COMPACT\r
+- present |= NOTMUCH_OPTION_COMPACT;\r
+-#endif\r
+-\r
+-#if HAVE_XAPIAN_COMPACT\r
+- present |= NOTMUCH_OPTION_FIELD_PROCESSOR;\r
+-#endif\r
+-\r
+- return (mask & present) != 0;\r
+-\r
+-}\r
+-\r
+-notmuch_bool_t\r
+-notmuch_options_get (const char *name) {\r
++notmuch_built_with (const char *name) {\r
+ if (STRNCMP_LITERAL (name, "compact") == 0) {\r
+- return notmuch_options_present (NOTMUCH_OPTION_COMPACT);\r
++ return HAVE_XAPIAN_COMPACT;\r
+ } else if (STRNCMP_LITERAL (name, "field_processor") == 0) {\r
+- return notmuch_options_present (NOTMUCH_OPTION_FIELD_PROCESSOR);\r
++ return HAVE_XAPIAN_FIELD_PROCESSOR;\r
+ } else {\r
+ return FALSE;\r
+ }\r
+diff --git a/lib/notmuch.h b/lib/notmuch.h\r
+index 2278822..bd977c3 100644\r
+--- a/lib/notmuch.h\r
++++ b/lib/notmuch.h\r
+@@ -1902,16 +1902,11 @@ notmuch_config_list_move_to_next (notmuch_config_list_t *config_list);\r
+ void\r
+ notmuch_config_list_destroy (notmuch_config_list_t *config_list);\r
+ \r
+-typedef enum {\r
+- NOTMUCH_OPTION_COMPACT = 1,\r
+- NOTMUCH_OPTION_FIELD_PROCESSOR = 2\r
+-} notmuch_option_t;\r
+-\r
+-notmuch_bool_t\r
+-notmuch_options_present (notmuch_option_t mask);\r
+-\r
++/**\r
++ * interrogate the library for compile time features\r
++ */\r
+ notmuch_bool_t\r
+-notmuch_options_get (const char *name);\r
++notmuch_built_with (const char *name);\r
+ /* @} */\r
+ \r
+ NOTMUCH_END_DECLS\r
+diff --git a/notmuch-config.c b/notmuch-config.c\r
+index 121fec6..e4f47e4 100644\r
+--- a/notmuch-config.c\r
++++ b/notmuch-config.c\r
+@@ -750,7 +750,7 @@ _item_split (char *item, char **group, char **key)\r
+ return 0;\r
+ }\r
+ \r
+-#define OPTION_PREFIX "options."\r
++#define BUILT_WITH_PREFIX "built_with."\r
+ #define QUERY_PREFIX "query."\r
+ \r
+ static int\r
+@@ -797,9 +797,9 @@ notmuch_config_command_get (notmuch_config_t *config, char *item)\r
+ tags = notmuch_config_get_new_tags (config, &length);\r
+ for (i = 0; i < length; i++)\r
+ printf ("%s\n", tags[i]);\r
+- } else if (STRNCMP_LITERAL (item, OPTION_PREFIX) == 0) {\r
++ } else if (STRNCMP_LITERAL (item, BUILT_WITH_PREFIX) == 0) {\r
+ printf ("%s\n",\r
+- notmuch_options_get (item + strlen (OPTION_PREFIX)) ? "true" : "false");\r
++ notmuch_built_with (item + strlen (BUILT_WITH_PREFIX)) ? "true" : "false");\r
+ } else if (STRNCMP_LITERAL (item, QUERY_PREFIX) == 0) {\r
+ return _print_db_config (config, item);\r
+ } else {\r
+@@ -866,7 +866,7 @@ notmuch_config_command_set (notmuch_config_t *config, char *item, int argc, char\r
+ {\r
+ char *group, *key;\r
+ \r
+- if (STRNCMP_LITERAL (item, OPTION_PREFIX) == 0) {\r
++ if (STRNCMP_LITERAL (item, BUILT_WITH_PREFIX) == 0) {\r
+ fprintf (stderr, "Error: read only option: %s\n", item);\r
+ return 1;\r
+ }\r
+@@ -904,10 +904,12 @@ notmuch_config_command_set (notmuch_config_t *config, char *item, int argc, char\r
+ static\r
+ void\r
+ _notmuch_config_list_options () {\r
+- printf("options.compact=%s\n",\r
+- notmuch_options_present(NOTMUCH_OPTION_COMPACT) ? "true" : "false");\r
+- printf("options.field_processor=%s\n",\r
+- notmuch_options_present(NOTMUCH_OPTION_FIELD_PROCESSOR) ? "true" : "false");\r
++ printf("%scompact=%s\n",\r
++ BUILT_WITH_PREFIX,\r
++ notmuch_built_with ("compact") ? "true" : "false");\r
++ printf("%sfield_processor=%s\n",\r
++ BUILT_WITH_PREFIX,\r
++ notmuch_built_with ("field_processor") ? "true" : "false");\r
+ }\r
+ \r
+ static int\r
+diff --git a/test/T030-config.sh b/test/T030-config.sh\r
+index 39ee885..b8d5a86 100755\r
+--- a/test/T030-config.sh\r
++++ b/test/T030-config.sh\r
+@@ -57,8 +57,8 @@ maildir.synchronize_flags=true\r
+ crypto.gpg_path=gpg\r
+ foo.string=this is another string value\r
+ foo.list=this;is another;list value;\r
+-options.compact=something\r
+-options.field_processor=something\r
++built_with.compact=something\r
++built_with.field_processor=something\r
+ EOF\r
+ test_expect_equal_file EXPECTED OUTPUT\r
+ \r
+diff --git a/test/T040-setup.sh b/test/T040-setup.sh\r
+index 5db03a6..be2f0db 100755\r
+--- a/test/T040-setup.sh\r
++++ b/test/T040-setup.sh\r
+@@ -19,7 +19,7 @@ another.suite@example.com\r
+ foo bar\r
+ baz\r
+ EOF\r
+-output=$(notmuch --config=new-notmuch-config config list | notmuch_options_sanitize)\r
++output=$(notmuch --config=new-notmuch-config config list | notmuch_built_with_sanitize)\r
+ test_expect_equal "$output" "\\r
+ database.path=/path/to/maildir\r
+ user.name=Test Suite\r
+@@ -30,7 +30,7 @@ new.ignore=\r
+ search.exclude_tags=baz;\r
+ maildir.synchronize_flags=true\r
+ crypto.gpg_path=gpg\r
+-options.compact=something\r
+-options.field_processor=something"\r
++built_with.compact=something\r
++built_with.field_processor=something"\r
+ \r
+ test_done\r
+diff --git a/test/test-lib.sh b/test/test-lib.sh\r
+index b5a1941..e96c184 100644\r
+--- a/test/test-lib.sh\r
++++ b/test/test-lib.sh\r
+@@ -740,9 +740,9 @@ notmuch_uuid_sanitize ()\r
+ sed 's/[0-9a-f]\{8\}-[0-9a-f]\{4\}-[0-9a-f]\{4\}-[0-9a-f]\{4\}-[0-9a-f]\{12\}/UUID/g'\r
+ }\r
+ \r
+-notmuch_options_sanitize ()\r
++notmuch_built_with_sanitize ()\r
+ {\r
+- sed 's/^options[.]\(.*\)=.*$/options.\1=something/'\r
++ sed 's/^built_with[.]\(.*\)=.*$/built_with.\1=something/'\r
+ }\r
+ \r
+ notmuch_config_sanitize ()\r