Re: [PATCH v2 2/4] nmbug-status: Add meta.message-url config setting
authorDavid Bremner <david@tethera.net>
Wed, 23 Mar 2016 11:19:34 +0000 (08:19 +2100)
committerW. Trevor King <wking@tremily.us>
Sat, 20 Aug 2016 23:21:22 +0000 (16:21 -0700)
63/4fc9588ddc6af0af42523fa09660aaa6787494 [new file with mode: 0644]

diff --git a/63/4fc9588ddc6af0af42523fa09660aaa6787494 b/63/4fc9588ddc6af0af42523fa09660aaa6787494
new file mode 100644 (file)
index 0000000..f6d4851
--- /dev/null
@@ -0,0 +1,78 @@
+Return-Path: <david@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 473226DE02A9\r
+ for <notmuch@notmuchmail.org>; Wed, 23 Mar 2016 04:19:48 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at cworth.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.027\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.027 tagged_above=-999 required=5\r
+ tests=[AWL=-0.016, 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 gk2U9V37aoA8 for <notmuch@notmuchmail.org>;\r
+ Wed, 23 Mar 2016 04:19:39 -0700 (PDT)\r
+Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197])\r
+ by arlo.cworth.org (Postfix) with ESMTPS id 889CF6DE0217\r
+ for <notmuch@notmuchmail.org>; Wed, 23 Mar 2016 04:19:39 -0700 (PDT)\r
+Received: from remotemail by fethera.tethera.net with local (Exim 4.84)\r
+ (envelope-from <david@tethera.net>)\r
+ id 1aigpg-0003Pg-5Z; Wed, 23 Mar 2016 07:20:12 -0400\r
+Received: (nullmailer pid 13882 invoked by uid 1000);\r
+ Wed, 23 Mar 2016 11:19:34 -0000\r
+From: David Bremner <david@tethera.net>\r
+To: "W. Trevor King" <wking@tremily.us>, notmuch@notmuchmail.org\r
+Subject: Re: [PATCH v2 2/4] nmbug-status: Add meta.message-url config setting\r
+In-Reply-To:\r
+ <9377a4c1265b13f9588d21ec0ea591ea9f61a05f.1451683912.git.wking@tremily.us>\r
+References: <cover.1451683912.git.wking@tremily.us>\r
+ <9377a4c1265b13f9588d21ec0ea591ea9f61a05f.1451683912.git.wking@tremily.us>\r
+User-Agent: Notmuch/0.21+74~g6c60fb1 (http://notmuchmail.org) Emacs/24.5.1\r
+ (x86_64-pc-linux-gnu)\r
+Date: Wed, 23 Mar 2016 08:19:34 -0300\r
+Message-ID: <87zitpjvax.fsf@zancas.localnet>\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: Wed, 23 Mar 2016 11:19:48 -0000\r
+\r
+"W. Trevor King" <wking@tremily.us> writes:\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
+\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
+\r
+Maybe I'm missing some python knowledged, but it looks the constructor\r
+is defined to take a regular argument for message_url_template, but only\r
+passed in as a keyword. Does this really work?\r
+\r
+d\r