--- /dev/null
+Return-Path: <wking@tremily.us>\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 9364F6DE1A7C\r
+ for <notmuch@notmuchmail.org>; Wed, 30 Dec 2015 11:29:32 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at cworth.org\r
+X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References"\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.011\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.011 tagged_above=-999 required=5 tests=[AWL=0.091,\r
+ DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
+ RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001]\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 nTBTuXnhf2lD for <notmuch@notmuchmail.org>;\r
+ Wed, 30 Dec 2015 11:29:30 -0800 (PST)\r
+Received: from resqmta-po-02v.sys.comcast.net (resqmta-po-02v.sys.comcast.net\r
+ [96.114.154.161])\r
+ by arlo.cworth.org (Postfix) with ESMTPS id B144F6DE1AE3\r
+ for <notmuch@notmuchmail.org>; Wed, 30 Dec 2015 11:29:27 -0800 (PST)\r
+Received: from resomta-po-15v.sys.comcast.net ([96.114.154.239])\r
+ by resqmta-po-02v.sys.comcast.net with comcast\r
+ id zvQ91r0055AAYLo01vQgUL; Wed, 30 Dec 2015 19:24:40 +0000\r
+Received: from mail.tremily.us ([73.221.72.168])\r
+ by resomta-po-15v.sys.comcast.net with comcast\r
+ id zvNe1r0083dr3C901vNeeN; Wed, 30 Dec 2015 19:22:39 +0000\r
+Received: by mail.tremily.us (Postfix, from userid 1000)\r
+ id 5DDB31B2C3F3; Wed, 30 Dec 2015 11:22:38 -0800 (PST)\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tremily.us; s=odin;\r
+ t=1451503358; bh=7lpg1sMhj9F2V24M7ZoPVzRvgec3lUkeYWQsVc63neo=;\r
+ h=Resent-From:Resent-Date:Resent-To:From:To:Cc:Subject:Date:\r
+ In-Reply-To:References:In-Reply-To:References;\r
+ b=RELugRBbl4Q4h/+b9eZ+Y7RoKzEtOwWmoFpPqALlPgsA8qgyhjTNzZlpUlBccSY/8\r
+ U5p6RM0ASQ5i58whUNlD9Kbb6F9Tqs9gJfhgD0p5YkcM8o390d+W8gVt5epuXfauc4\r
+ lqw6dO2z7sd7Agt3O5InRSNuTJ4FqpNAJ1nlS5rE=\r
+Resent-From: "W. Trevor King" <wking@tremily.us>\r
+Resent-Date: Wed, 30 Dec 2015 11:22:38 -0800\r
+Resent-Message-ID: <20151230192238.GD2452@odin.tremily.us>\r
+Resent-To: notmuch@notmuchmail.org\r
+From: "W. Trevor King" <wking@tremily.us>\r
+To: notmuch@notmuchmail.org\r
+Cc: David Bremner <david@tethera.net>,\r
+ Tomi Ollila <tomi.ollila@iki.fi>, Jani Nikula <jani@nikula.org>,\r
+ Carl Worth <cworth@cworth.org>, "W. Trevor King" <wking@tremily.us>\r
+Subject: [PATCH 3/5] nmbug-status: Add an nmbug-status(5) man page\r
+Date: Wed, 30 Dec 2015 11:16:58 -0800\r
+Message-Id:\r
+ <0a1bd306cb2e306ff49d72b6d2466c1d4a0ade2b.1451502495.git.wking@tremily.us>\r
+X-Mailer: git-send-email 2.1.0.60.g85f0837\r
+In-Reply-To: <cover.1451502495.git.wking@tremily.us>\r
+References: <cover.1451502495.git.wking@tremily.us>\r
+In-Reply-To: <cover.1451502495.git.wking@tremily.us>\r
+References: <cover.1451502495.git.wking@tremily.us>\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net;\r
+ s=q20140121; t=1451503480;\r
+ bh=7gqjWospgux+NSTERSMc3/4miGJ8PQuaMvON5bxZghQ=;\r
+ h=Received:Received:Received:From:To:Subject:Date:Message-Id;\r
+ b=uIJ+a8FCuum3wB1prlKSB0yP1d7UVryLHarW/CFqnGwbJHxWRxeOvW1N/EN8+hWf8\r
+ uDGtRZt3eHZyk8H7IcVTlNilTov1+kVLCVc6vVfnUvsSMwF/XfJhOcGNGxnIudrEfA\r
+ P2kix5HUOnrFKpxs8SSkbQU18/1Xs3tVJ8a/jK/h3FqShEQ5iqButtLqzFDvz58dw/\r
+ nIhxmGqB6x5TSaI+WV1r9/Z+CgNhWf55HUoMDx23iV6WBd6r7syUetYlkfs4kfZvcV\r
+ 0J9qs16WcNK8CRqMVRWciucUMxMItGpB0uCeD8WX/lTbI9T+oPmrg62A74+Aa9k0KM\r
+ uWBlNuUTvCNjQ==\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: Wed, 30 Dec 2015 19:29:32 -0000\r
+\r
+To describe the config file format, so folks don't have to dig through\r
+NEWS or the nmbug-status source to get that information.\r
+---\r
+ NEWS | 5 ++\r
+ devel/nmbug/nmbug-status | 19 ++++---\r
+ doc/conf.py | 6 ++\r
+ doc/index.rst | 1 +\r
+ doc/man5/nmbug-status.rst | 136 ++++++++++++++++++++++++++++++++++++++++++++++\r
+ 5 files changed, 159 insertions(+), 8 deletions(-)\r
+ create mode 100644 doc/man5/nmbug-status.rst\r
+\r
+diff --git a/NEWS b/NEWS\r
+index 9f2e860..9a6a757 100644\r
+--- a/NEWS\r
++++ b/NEWS\r
+@@ -1,6 +1,11 @@\r
+ Notmuch 0.22 (UNRELEASED)\r
+ =========================\r
+ \r
++Documentation\r
++-------------\r
++\r
++A new `nmbug-status(5)` describes `nmbug-status`'s JSON config file.\r
++\r
+ nmbug-status\r
+ ------------\r
+ \r
+diff --git a/devel/nmbug/nmbug-status b/devel/nmbug/nmbug-status\r
+index d72f1db..336d0d2 100755\r
+--- a/devel/nmbug/nmbug-status\r
++++ b/devel/nmbug/nmbug-status\r
+@@ -309,14 +309,17 @@ class HtmlPage (Page):\r
+ return self._slug_regexp.sub('-', string)\r
+ \r
+ parser = argparse.ArgumentParser(description=__doc__)\r
+-parser.add_argument('--text', help='output plain text format',\r
+- action='store_true')\r
+-parser.add_argument('--config', help='load config from given file',\r
+- metavar='PATH')\r
+-parser.add_argument('--list-views', help='list views',\r
+- action='store_true')\r
+-parser.add_argument('--get-query', help='get query for view',\r
+- metavar='VIEW')\r
++parser.add_argument(\r
++ '--text', action='store_true', help='output plain text format')\r
++parser.add_argument(\r
++ '--config', metavar='PATH',\r
++ help='load config from given file. '\r
++ 'The format is described in nmbug-status(5).')\r
++parser.add_argument(\r
++ '--list-views', action='store_true', help='list views')\r
++parser.add_argument(\r
++ '--get-query', metavar='VIEW', help='get query for view')\r
++\r
+ \r
+ args = parser.parse_args()\r
+ \r
+diff --git a/doc/conf.py b/doc/conf.py\r
+index 65adafe..eac747e 100644\r
+--- a/doc/conf.py\r
++++ b/doc/conf.py\r
+@@ -118,6 +118,9 @@ man_pages = [\r
+ u'add/remove tags for all messages matching the search terms',\r
+ [u'Carl Worth and many others'], 1),\r
+ \r
++('man5/nmbug-status','nmbug-status',\r
++ u'configuration for nmbug-status',\r
++ [u'Carl Worth and many others'], 5),\r
+ \r
+ ]\r
+ # If true, show URL addresses after external links.\r
+@@ -180,4 +183,7 @@ texinfo_documents = [\r
+ ('man1/notmuch-tag','notmuch-tag',u'notmuch Documentation',\r
+ u'Carl Worth and many others', 'notmuch-tag',\r
+ 'add/remove tags for all messages matching the search terms','Miscellaneous'),\r
++('man5/nmbug-status','nmbug-status',u'notmuch Documentation',\r
++ u'Carl Worth and many others', 'nmbug-status',\r
++ 'configuration for nmbug-status','Miscellaneous'),\r
+ ]\r
+diff --git a/doc/index.rst b/doc/index.rst\r
+index 3f0e6e6..bcb1dd0 100644\r
+--- a/doc/index.rst\r
++++ b/doc/index.rst\r
+@@ -23,6 +23,7 @@ Contents:\r
+ man7/notmuch-search-terms\r
+ man1/notmuch-show\r
+ man1/notmuch-tag\r
++ man5/nmbug-status\r
+ \r
+ Indices and tables\r
+ ==================\r
+diff --git a/doc/man5/nmbug-status.rst b/doc/man5/nmbug-status.rst\r
+new file mode 100644\r
+index 0000000..5b59bdd\r
+--- /dev/null\r
++++ b/doc/man5/nmbug-status.rst\r
+@@ -0,0 +1,136 @@\r
++============\r
++nmbug-status\r
++============\r
++\r
++NAME\r
++====\r
++\r
++status-config.json - configure output for **nmbug-status(1)**\r
++\r
++DESCRIPTION\r
++===========\r
++\r
++The config file is JSON_ with the following fields:\r
++\r
++meta\r
++ An object with page-wide information\r
++\r
++ title\r
++ Page title used in the default header.\r
++\r
++ blurb\r
++ Introduction paragraph used in the default header.\r
++\r
++ header\r
++ `Python format string`_ for the HTML header. Optional. It is\r
++ formatted with the following context:\r
++\r
++ date\r
++ The current UTC date.\r
++\r
++ datetime\r
++ The current UTC date-time.\r
++\r
++ title\r
++ The **meta.title** value.\r
++\r
++ blurb\r
++ The **meta.blurb** value.\r
++\r
++ encoding\r
++ The encoding used for the output file.\r
++\r
++ inter_message_padding\r
++ 0.25em, for consistent CSS generation.\r
++\r
++ border_radius\r
++ 0.5em, for consistent CSS generation.\r
++\r
++ footer\r
++ `Python format string`_ for the HTML footer. It is formatted with\r
++ the same context used for **meta.header**. Optional.\r
++\r
++ message-url\r
++ `Python format string`_ for message-linking URLs. Optional.\r
++ Defaults to linking Gmane_. It is formatted with the following\r
++ context:\r
++\r
++ message-id\r
++ The quoted_ message ID.\r
++\r
++ subject\r
++ The message subject.\r
++\r
++views\r
++ An array of view objects, where each object has the following\r
++ fields:\r
++\r
++ title\r
++ Header text for the view.\r
++\r
++ comment\r
++ Paragraph describing the view in more detail. Optional.\r
++\r
++ id\r
++ Anchor string for the view. Optional, defaulting to a slugged\r
++ form of the view title\r
++\r
++ query\r
++ An array of strings, which will be joined with 'and' to form the\r
++ view query.\r
++\r
++.. _Gmane: http://gmane.org/\r
++.. _JSON: http://json.org/\r
++.. _Python format string: https://docs.python.org/3/library/string.html#formatstrings\r
++.. _quoted: https://docs.python.org/3/library/urllib.parse.html#urllib.parse.quote\r
++\r
++EXAMPLE\r
++=======\r
++\r
++::\r
++\r
++ {\r
++ "meta": {\r
++ "title": "Notmuch Patches",\r
++ "blurb": "For more information see <a href=\"http://notmuchmail.org/nmbug\">nmbug</a>",\r
++ "header": "<html><head></head><body><h1>{title}</h1><p>{blurb}</p><h2>Views</h2>",\r
++ "footer": "<hr><p>Generated: {datetime}</p></html>",\r
++ "message-url": "http://mid.gmane.org/{message-id}"\r
++ },\r
++ "views": [\r
++ {\r
++ "title": "Bugs",\r
++ "comment": "Unresolved bugs.",\r
++ "query": [\r
++ "tag:notmuch::bug",\r
++ "not tag:notmuch::fixed",\r
++ "not tag:notmuch::wontfix"\r
++ ]\r
++ },\r
++ {\r
++ "title": "Review",\r
++ "comment": "These patches are under review, or waiting for feedback.",\r
++ "id": "under-review",\r
++ "query": [\r
++ "tag:notmuch::patch",\r
++ "not tag:notmuch::pushed",\r
++ "not tag:notmuch::obsolete",\r
++ "not tag:notmuch::stale",\r
++ "not tag:notmuch::wontfix",\r
++ "(tag:notmuch::moreinfo or tag:notmuch::needs-review)"\r
++ ]\r
++ }\r
++ ]\r
++ }\r
++\r
++FILES\r
++=====\r
++\r
++If ``--config PATH`` is not set, ``nmbug-status`` will attempt to load\r
++a config file named ``status-config.json`` from the ``config`` branch\r
++of the ``NMBGIT`` repository (defaulting to ``~/.nmbug``).\r
++\r
++SEE ALSO\r
++========\r
++\r
++**notmuch(1)**, **notmuch-search(1)**, **notmuch-tag(1)**\r
+-- \r
+2.1.0.60.g85f0837\r
+\r