unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: David Bremner <david@tethera.net>
To: "W. Trevor King" <wking@tremily.us>, notmuch@notmuchmail.org
Subject: Re: [PATCH v2 2/4] nmbug-status: Add meta.message-url config setting
Date: Wed, 23 Mar 2016 08:19:34 -0300	[thread overview]
Message-ID: <87zitpjvax.fsf@zancas.localnet> (raw)
In-Reply-To: <9377a4c1265b13f9588d21ec0ea591ea9f61a05f.1451683912.git.wking@tremily.us>

"W. Trevor King" <wking@tremily.us> 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

  reply	other threads:[~2016-03-23 11:19 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-02  6:07 [PATCH v2 0/4] nmbug-status: meta.message-url and query parens W. Trevor King
2016-01-02  6:07 ` [PATCH v2 1/4] NEWS: Remove trailing comma from an old nmbug-status config W. Trevor King
2016-01-07 13:27   ` David Bremner
2016-01-02  6:07 ` [PATCH v2 2/4] nmbug-status: Add meta.message-url config setting W. Trevor King
2016-03-23 11:19   ` David Bremner [this message]
2016-03-23 16:42     ` W. Trevor King
2016-01-02  6:07 ` [PATCH v2 3/4] nmbug-status: Wrap query phrases in parentheses when and-ing together W. Trevor King
2016-01-02  6:07 ` [PATCH v2 4/4] status-config.json: Remove parens from query entry W. Trevor King
2016-03-24 10:53   ` David Bremner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87zitpjvax.fsf@zancas.localnet \
    --to=david@tethera.net \
    --cc=notmuch@notmuchmail.org \
    --cc=wking@tremily.us \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).