--- /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 ED65A6DE1A20\r
+ for <notmuch@notmuchmail.org>; Wed, 30 Dec 2015 11:29:21 -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.012\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.012 tagged_above=-999 required=5 tests=[AWL=0.089,\r
+ DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
+ RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001] 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 sOeknRauquNS for <notmuch@notmuchmail.org>;\r
+ Wed, 30 Dec 2015 11:29:20 -0800 (PST)\r
+Received: from resqmta-po-10v.sys.comcast.net (resqmta-po-10v.sys.comcast.net\r
+ [96.114.154.169])\r
+ by arlo.cworth.org (Postfix) with ESMTPS id C2A836DE1A0E\r
+ for <notmuch@notmuchmail.org>; Wed, 30 Dec 2015 11:29:19 -0800 (PST)\r
+Received: from resomta-po-03v.sys.comcast.net ([96.114.154.227])\r
+ by resqmta-po-10v.sys.comcast.net with comcast\r
+ id zvQK1r0024ueUHc01vQKt6; Wed, 30 Dec 2015 19:24:19 +0000\r
+Received: from mail.tremily.us ([73.221.72.168])\r
+ by resomta-po-03v.sys.comcast.net with comcast\r
+ id zvNJ1r00D3dr3C901vNJEo; Wed, 30 Dec 2015 19:22:19 +0000\r
+Received: by mail.tremily.us (Postfix, from userid 1000)\r
+ id 6A98E1B2C3DE; Wed, 30 Dec 2015 11:22:18 -0800 (PST)\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tremily.us; s=odin;\r
+ t=1451503338; bh=tk+6BE9cwA7KEGMk/RW7QHXvxUJjWFx0oRrqkFUFt1Q=;\r
+ h=Resent-From:Resent-Date:Resent-To:From:To:Cc:Subject:Date:\r
+ In-Reply-To:References:In-Reply-To:References;\r
+ b=Tb2jozfeQz/E1iJDZySQ44y1ZR+WtGgtBP8QZucXOevKJNMM7fMNaU/aq083GI4nU\r
+ kkA6FZ3t7W00ZcbkkB0II7JVrxWH6kRnhMRcXqsjjOvlYToNVtv6v5ELvunJTRVbso\r
+ Lmty72cI82dJuUIf76qu15Cg+T5/kGYD3A2GZtZY=\r
+Resent-From: "W. Trevor King" <wking@tremily.us>\r
+Resent-Date: Wed, 30 Dec 2015 11:22:18 -0800\r
+Resent-Message-ID: <20151230192218.GC2452@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 2/5] nmbug-status: Add meta.message-url config setting\r
+Date: Wed, 30 Dec 2015 11:16:57 -0800\r
+Message-Id:\r
+ <9377a4c1265b13f9588d21ec0ea591ea9f61a05f.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=1451503459;\r
+ bh=Nnq9N1s17J4Xjz52SmfpWDWNd2bbsmDF/Pmv79592wg=;\r
+ h=Received:Received:Received:From:To:Subject:Date:Message-Id;\r
+ b=BmDgaFIIapYcKVf9vWLhtfRzPQ7tfdMcZUZtuwhxJJ9V9d0BKi9fQgR5z9D2WH6tl\r
+ LHfWfISkQ1AszZ6jM5fDT+s3nGnIgJI0gyn1R8lYtALxDOJz0Qm611w2oG9Aht//zI\r
+ tWa9VjRo5QK4uT//fgZjscj7IRl3KxMTJ5jTJxxGXqolmVR9dRdtzjDxGPtHLctRh2\r
+ pOJO7yoh7VhFgR3T8IO4XYU9oKm3g0fRSgg6L01YJbQFVh7iLF9/19JcP6f7T8XzvG\r
+ Bz6Yp+jh1vCkI8W0LJLF5cPnAEVAi6F7Mimm9lax0MJHA7Rof2gBmHVY2EktxIPYeH\r
+ Vl8NRy0F+jVmA==\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:22 -0000\r
+\r
+So you can link to archives other than Gmane. For example, I'm doing\r
+this in [1].\r
+\r
+[1]: https://github.com/wking/nmbug-oci\r
+---\r
+ NEWS | 20 ++++++++++++++++++++\r
+ devel/nmbug/nmbug-status | 13 ++++++++++---\r
+ 2 files changed, 30 insertions(+), 3 deletions(-)\r
+\r
+diff --git a/NEWS b/NEWS\r
+index 0a7a0e0..9f2e860 100644\r
+--- a/NEWS\r
++++ b/NEWS\r
+@@ -1,3 +1,23 @@\r
++Notmuch 0.22 (UNRELEASED)\r
++=========================\r
++\r
++nmbug-status\r
++------------\r
++\r
++`nmbug-status` now supports `meta.message-url` to override the Gmane\r
++template. For example, you can use:\r
++\r
++ {\r
++ "meta": {\r
++ "message-url": "https://groups.google.com/a/opencontainers.org/forum/#!search/messageid$3A%22{message-id}%22"\r
++ ...\r
++ },\r
++ ...\r
++ }\r
++\r
++To link to messages in the [opencontainers.org Google\r
++Groups](https://groups.google.com/a/opencontainers.org/forum/#!overview).\r
++\r
+ Notmuch 0.21 (2015-10-29)\r
+ =========================\r
+ \r
+diff --git a/devel/nmbug/nmbug-status b/devel/nmbug/nmbug-status\r
+index b36b6ad..d72f1db 100755\r
+--- a/devel/nmbug/nmbug-status\r
++++ b/devel/nmbug/nmbug-status\r
+@@ -19,11 +19,11 @@\r
+ # You should have received a copy of the GNU General Public License\r
+ # along with this program. If not, see http://www.gnu.org/licenses/ .\r
+ \r
+-"""Generate HTML for one or more notmuch searches.\r
++"""Generate text and/or HTML for one or more notmuch searches.\r
+ \r
+ Messages matching each search are grouped by thread. Each message\r
+ that contains both a subject and message-id will have the displayed\r
+-subject link to the Gmane view of the message.\r
++subject link to an archive view of the message (defaulting to Gmane).\r
+ """\r
+ \r
+ from __future__ import print_function\r
+@@ -232,6 +232,10 @@ class Page (object):\r
+ class HtmlPage (Page):\r
+ _slug_regexp = re.compile('\W+')\r
+ \r
++ def __init__(self, message_url_template, **kwargs):\r
++ self.message_url_template = message_url_template\r
++ super(HtmlPage, self).__init__(**kwargs)\r
++\r
+ def _write_header(self, views, stream):\r
+ super(HtmlPage, self)._write_header(views=views, stream=stream)\r
+ stream.write('<ul>\n')\r
+@@ -292,8 +296,9 @@ class HtmlPage (Page):\r
+ 'message-id': quote(display_data['message-id']),\r
+ 'subject': xml.sax.saxutils.escape(display_data['subject']),\r
+ }\r
++ d['url'] = self.message_url_template.format(**d)\r
+ display_data['subject'] = (\r
+- '<a href="http://mid.gmane.org/{message-id}">{subject}</a>'\r
++ '<a href="{url}">{subject}</a>'\r
+ ).format(**d)\r
+ for key in ['message-id', 'from']:\r
+ if key in display_data:\r
+@@ -395,6 +400,8 @@ _PAGES['text'] = Page()\r
+ _PAGES['html'] = HtmlPage(\r
+ header=header_template.format(**context),\r
+ footer=footer_template.format(**context),\r
++ message_url_template=config['meta'].get(\r
++ 'message-url', 'http://mid.gmane.org/{message-id}'),\r
+ )\r
+ \r
+ if args.list_views:\r
+-- \r
+2.1.0.60.g85f0837\r
+\r