From: David Bremner Date: Wed, 23 Mar 2016 11:19:34 +0000 (+2100) Subject: Re: [PATCH v2 2/4] nmbug-status: Add meta.message-url config setting X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=b15d62173d00e0221ab9cf92a83efa77152d58eb;p=notmuch-archives.git Re: [PATCH v2 2/4] nmbug-status: Add meta.message-url config setting --- diff --git a/63/4fc9588ddc6af0af42523fa09660aaa6787494 b/63/4fc9588ddc6af0af42523fa09660aaa6787494 new file mode 100644 index 000000000..f6d485125 --- /dev/null +++ b/63/4fc9588ddc6af0af42523fa09660aaa6787494 @@ -0,0 +1,78 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by arlo.cworth.org (Postfix) with ESMTP id 473226DE02A9 + for ; Wed, 23 Mar 2016 04:19:48 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at cworth.org +X-Spam-Flag: NO +X-Spam-Score: -0.027 +X-Spam-Level: +X-Spam-Status: No, score=-0.027 tagged_above=-999 required=5 + tests=[AWL=-0.016, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01] + autolearn=disabled +Received: from arlo.cworth.org ([127.0.0.1]) + by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id gk2U9V37aoA8 for ; + Wed, 23 Mar 2016 04:19:39 -0700 (PDT) +Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) + by arlo.cworth.org (Postfix) with ESMTPS id 889CF6DE0217 + for ; Wed, 23 Mar 2016 04:19:39 -0700 (PDT) +Received: from remotemail by fethera.tethera.net with local (Exim 4.84) + (envelope-from ) + id 1aigpg-0003Pg-5Z; Wed, 23 Mar 2016 07:20:12 -0400 +Received: (nullmailer pid 13882 invoked by uid 1000); + Wed, 23 Mar 2016 11:19:34 -0000 +From: David Bremner +To: "W. Trevor King" , notmuch@notmuchmail.org +Subject: Re: [PATCH v2 2/4] nmbug-status: Add meta.message-url config setting +In-Reply-To: + <9377a4c1265b13f9588d21ec0ea591ea9f61a05f.1451683912.git.wking@tremily.us> +References: + <9377a4c1265b13f9588d21ec0ea591ea9f61a05f.1451683912.git.wking@tremily.us> +User-Agent: Notmuch/0.21+74~g6c60fb1 (http://notmuchmail.org) Emacs/24.5.1 + (x86_64-pc-linux-gnu) +Date: Wed, 23 Mar 2016 08:19:34 -0300 +Message-ID: <87zitpjvax.fsf@zancas.localnet> +MIME-Version: 1.0 +Content-Type: text/plain +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.20 +Precedence: list +List-Id: "Use and development of the notmuch mail system." + +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +X-List-Received-Date: Wed, 23 Mar 2016 11:19:48 -0000 + +"W. Trevor King" writes: + +> from __future__ import print_function +> @@ -232,6 +232,10 @@ class Page (object): +> class HtmlPage (Page): +> _slug_regexp = re.compile('\W+') +> +> + def __init__(self, message_url_template, **kwargs): +> + self.message_url_template = message_url_template +> + super(HtmlPage, self).__init__(**kwargs) +> + + +> @@ -395,6 +400,8 @@ _PAGES['text'] = Page() +> _PAGES['html'] = HtmlPage( +> header=header_template.format(**context), +> footer=footer_template.format(**context), +> + message_url_template=config['meta'].get( +> + 'message-url', 'http://mid.gmane.org/{message-id}'), +> ) +> + +Maybe I'm missing some python knowledged, but it looks the constructor +is defined to take a regular argument for message_url_template, but only +passed in as a keyword. Does this really work? + +d