unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [PATCH 0/5] nmbug-status: meta.message-url, man page, and query parens
@ 2015-12-30 19:16 W. Trevor King
  2015-12-30 19:16 ` [PATCH 1/5] NEWS: Remove trailing comma from an old nmbug-status config W. Trevor King
                   ` (4 more replies)
  0 siblings, 5 replies; 15+ messages in thread
From: W. Trevor King @ 2015-12-30 19:16 UTC (permalink / raw)
  To: notmuch; +Cc: David Bremner, Tomi Ollila, Jani Nikula, Carl Worth,
	W. Trevor King

I needed meta.message-url for [1], and then felt like the config file
was getting complicated enough that it deserved some docs.

The query paren and trailing-comma fixups are drive-bys, and I can
split then out into their own series if that's easier.  I'm also happy
having patches cherry-picked out of this series as each patch passes
review.  The only strict dependency is that the man page has to land
after the meta.message-url patch, because it documents that field.

Cheers,
Trevor

[1]: https://github.com/wking/nmbug-oci

W. Trevor King (5):
  NEWS: Remove trailing comma from an old nmbug-status config
  nmbug-status: Add meta.message-url config setting
  nmbug-status: Add an nmbug-status(5) man page
  nmbug-status: Wrap query phrases in parentheses when and-ing together
  status-config.json: Remove parens from query entry

 NEWS                           |  30 ++++++++-
 devel/nmbug/nmbug-status       |  35 +++++++----
 devel/nmbug/status-config.json |   2 +-
 doc/conf.py                    |   6 ++
 doc/index.rst                  |   1 +
 doc/man5/nmbug-status.rst      | 136 +++++++++++++++++++++++++++++++++++++++++
 6 files changed, 196 insertions(+), 14 deletions(-)
 create mode 100644 doc/man5/nmbug-status.rst

-- 
2.1.0.60.g85f0837

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [PATCH 1/5] NEWS: Remove trailing comma from an old nmbug-status config
  2015-12-30 19:16 [PATCH 0/5] nmbug-status: meta.message-url, man page, and query parens W. Trevor King
@ 2015-12-30 19:16 ` W. Trevor King
  2015-12-30 19:16 ` [PATCH 2/5] nmbug-status: Add meta.message-url config setting W. Trevor King
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 15+ messages in thread
From: W. Trevor King @ 2015-12-30 19:16 UTC (permalink / raw)
  To: notmuch; +Cc: David Bremner, Tomi Ollila, Jani Nikula, Carl Worth,
	W. Trevor King

That closing brace is the end of the config JSON; there won't be
anything coming after it.
---
 NEWS | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/NEWS b/NEWS
index 6681699..0a7a0e0 100644
--- a/NEWS
+++ b/NEWS
@@ -409,7 +409,7 @@ from the config file.  Use something like:
          ...
       },
       ...
-    },
+    }
 
 Python Bindings
 ---------------
-- 
2.1.0.60.g85f0837

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH 2/5] nmbug-status: Add meta.message-url config setting
  2015-12-30 19:16 [PATCH 0/5] nmbug-status: meta.message-url, man page, and query parens W. Trevor King
  2015-12-30 19:16 ` [PATCH 1/5] NEWS: Remove trailing comma from an old nmbug-status config W. Trevor King
@ 2015-12-30 19:16 ` W. Trevor King
  2015-12-30 19:16 ` [PATCH 3/5] nmbug-status: Add an nmbug-status(5) man page W. Trevor King
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 15+ messages in thread
From: W. Trevor King @ 2015-12-30 19:16 UTC (permalink / raw)
  To: notmuch; +Cc: David Bremner, Tomi Ollila, Jani Nikula, Carl Worth,
	W. Trevor King

So you can link to archives other than Gmane.  For example, I'm doing
this in [1].

[1]: https://github.com/wking/nmbug-oci
---
 NEWS                     | 20 ++++++++++++++++++++
 devel/nmbug/nmbug-status | 13 ++++++++++---
 2 files changed, 30 insertions(+), 3 deletions(-)

diff --git a/NEWS b/NEWS
index 0a7a0e0..9f2e860 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,23 @@
+Notmuch 0.22 (UNRELEASED)
+=========================
+
+nmbug-status
+------------
+
+`nmbug-status` now supports `meta.message-url` to override the Gmane
+template.  For example, you can use:
+
+    {
+      "meta": {
+        "message-url": "https://groups.google.com/a/opencontainers.org/forum/#!search/messageid$3A%22{message-id}%22"
+         ...
+      },
+      ...
+    }
+
+To link to messages in the [opencontainers.org Google
+Groups](https://groups.google.com/a/opencontainers.org/forum/#!overview).
+
 Notmuch 0.21 (2015-10-29)
 =========================
 
diff --git a/devel/nmbug/nmbug-status b/devel/nmbug/nmbug-status
index b36b6ad..d72f1db 100755
--- a/devel/nmbug/nmbug-status
+++ b/devel/nmbug/nmbug-status
@@ -19,11 +19,11 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see http://www.gnu.org/licenses/ .
 
-"""Generate HTML for one or more notmuch searches.
+"""Generate text and/or HTML for one or more notmuch searches.
 
 Messages matching each search are grouped by thread.  Each message
 that contains both a subject and message-id will have the displayed
-subject link to the Gmane view of the message.
+subject link to an archive view of the message (defaulting to Gmane).
 """
 
 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)
+
     def _write_header(self, views, stream):
         super(HtmlPage, self)._write_header(views=views, stream=stream)
         stream.write('<ul>\n')
@@ -292,8 +296,9 @@ class HtmlPage (Page):
                 'message-id': quote(display_data['message-id']),
                 'subject': xml.sax.saxutils.escape(display_data['subject']),
                 }
+            d['url'] = self.message_url_template.format(**d)
             display_data['subject'] = (
-                '<a href="http://mid.gmane.org/{message-id}">{subject}</a>'
+                '<a href="{url}">{subject}</a>'
                 ).format(**d)
         for key in ['message-id', 'from']:
             if key in display_data:
@@ -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}'),
     )
 
 if args.list_views:
-- 
2.1.0.60.g85f0837

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH 3/5] nmbug-status: Add an nmbug-status(5) man page
  2015-12-30 19:16 [PATCH 0/5] nmbug-status: meta.message-url, man page, and query parens W. Trevor King
  2015-12-30 19:16 ` [PATCH 1/5] NEWS: Remove trailing comma from an old nmbug-status config W. Trevor King
  2015-12-30 19:16 ` [PATCH 2/5] nmbug-status: Add meta.message-url config setting W. Trevor King
@ 2015-12-30 19:16 ` W. Trevor King
       [not found]   ` <87ege26fi4.fsf@nikula.org>
  2015-12-30 19:16 ` [PATCH 4/5] nmbug-status: Wrap query phrases in parentheses when and-ing together W. Trevor King
  2015-12-30 19:17 ` [PATCH 5/5] status-config.json: Remove parens from query entry W. Trevor King
  4 siblings, 1 reply; 15+ messages in thread
From: W. Trevor King @ 2015-12-30 19:16 UTC (permalink / raw)
  To: notmuch; +Cc: David Bremner, Tomi Ollila, Jani Nikula, Carl Worth,
	W. Trevor King

To describe the config file format, so folks don't have to dig through
NEWS or the nmbug-status source to get that information.
---
 NEWS                      |   5 ++
 devel/nmbug/nmbug-status  |  19 ++++---
 doc/conf.py               |   6 ++
 doc/index.rst             |   1 +
 doc/man5/nmbug-status.rst | 136 ++++++++++++++++++++++++++++++++++++++++++++++
 5 files changed, 159 insertions(+), 8 deletions(-)
 create mode 100644 doc/man5/nmbug-status.rst

diff --git a/NEWS b/NEWS
index 9f2e860..9a6a757 100644
--- a/NEWS
+++ b/NEWS
@@ -1,6 +1,11 @@
 Notmuch 0.22 (UNRELEASED)
 =========================
 
+Documentation
+-------------
+
+A new `nmbug-status(5)` describes `nmbug-status`'s JSON config file.
+
 nmbug-status
 ------------
 
diff --git a/devel/nmbug/nmbug-status b/devel/nmbug/nmbug-status
index d72f1db..336d0d2 100755
--- a/devel/nmbug/nmbug-status
+++ b/devel/nmbug/nmbug-status
@@ -309,14 +309,17 @@ class HtmlPage (Page):
         return self._slug_regexp.sub('-', string)
 
 parser = argparse.ArgumentParser(description=__doc__)
-parser.add_argument('--text', help='output plain text format',
-                    action='store_true')
-parser.add_argument('--config', help='load config from given file',
-                    metavar='PATH')
-parser.add_argument('--list-views', help='list views',
-                    action='store_true')
-parser.add_argument('--get-query', help='get query for view',
-                    metavar='VIEW')
+parser.add_argument(
+    '--text', action='store_true', help='output plain text format')
+parser.add_argument(
+    '--config', metavar='PATH',
+    help='load config from given file.  '
+        'The format is described in nmbug-status(5).')
+parser.add_argument(
+    '--list-views', action='store_true', help='list views')
+parser.add_argument(
+    '--get-query', metavar='VIEW', help='get query for view')
+
 
 args = parser.parse_args()
 
diff --git a/doc/conf.py b/doc/conf.py
index 65adafe..eac747e 100644
--- a/doc/conf.py
+++ b/doc/conf.py
@@ -118,6 +118,9 @@ man_pages = [
         u'add/remove tags for all messages matching the search terms',
         [u'Carl Worth and many others'], 1),
 
+('man5/nmbug-status','nmbug-status',
+        u'configuration for nmbug-status',
+        [u'Carl Worth and many others'], 5),
 
 ]
 # If true, show URL addresses after external links.
@@ -180,4 +183,7 @@ texinfo_documents = [
 ('man1/notmuch-tag','notmuch-tag',u'notmuch Documentation',
       u'Carl Worth and many others', 'notmuch-tag',
       'add/remove tags for all messages matching the search terms','Miscellaneous'),
+('man5/nmbug-status','nmbug-status',u'notmuch Documentation',
+      u'Carl Worth and many others', 'nmbug-status',
+      'configuration for nmbug-status','Miscellaneous'),
 ]
diff --git a/doc/index.rst b/doc/index.rst
index 3f0e6e6..bcb1dd0 100644
--- a/doc/index.rst
+++ b/doc/index.rst
@@ -23,6 +23,7 @@ Contents:
    man7/notmuch-search-terms
    man1/notmuch-show
    man1/notmuch-tag
+   man5/nmbug-status
 
 Indices and tables
 ==================
diff --git a/doc/man5/nmbug-status.rst b/doc/man5/nmbug-status.rst
new file mode 100644
index 0000000..5b59bdd
--- /dev/null
+++ b/doc/man5/nmbug-status.rst
@@ -0,0 +1,136 @@
+============
+nmbug-status
+============
+
+NAME
+====
+
+status-config.json - configure output for **nmbug-status(1)**
+
+DESCRIPTION
+===========
+
+The config file is JSON_ with the following fields:
+
+meta
+  An object with page-wide information
+
+  title
+    Page title used in the default header.
+
+  blurb
+    Introduction paragraph used in the default header.
+
+  header
+    `Python format string`_ for the HTML header.  Optional.  It is
+    formatted with the following context:
+
+    date
+      The current UTC date.
+
+    datetime
+      The current UTC date-time.
+
+    title
+      The **meta.title** value.
+
+    blurb
+      The **meta.blurb** value.
+
+    encoding
+      The encoding used for the output file.
+
+    inter_message_padding
+      0.25em, for consistent CSS generation.
+
+    border_radius
+      0.5em, for consistent CSS generation.
+
+  footer
+    `Python format string`_ for the HTML footer.  It is formatted with
+    the same context used for **meta.header**.  Optional.
+
+  message-url
+    `Python format string`_ for message-linking URLs.  Optional.
+    Defaults to linking Gmane_.  It is formatted with the following
+    context:
+
+    message-id
+      The quoted_ message ID.
+
+    subject
+      The message subject.
+
+views
+  An array of view objects, where each object has the following
+  fields:
+
+  title
+    Header text for the view.
+
+  comment
+    Paragraph describing the view in more detail.  Optional.
+
+  id
+    Anchor string for the view.  Optional, defaulting to a slugged
+    form of the view title
+
+  query
+    An array of strings, which will be joined with 'and' to form the
+    view query.
+
+.. _Gmane: http://gmane.org/
+.. _JSON: http://json.org/
+.. _Python format string: https://docs.python.org/3/library/string.html#formatstrings
+.. _quoted: https://docs.python.org/3/library/urllib.parse.html#urllib.parse.quote
+
+EXAMPLE
+=======
+
+::
+
+  {
+    "meta": {
+      "title": "Notmuch Patches",
+      "blurb": "For more information see <a href=\"http://notmuchmail.org/nmbug\">nmbug</a>",
+      "header": "<html><head></head><body><h1>{title}</h1><p>{blurb}</p><h2>Views</h2>",
+      "footer": "<hr><p>Generated: {datetime}</p></html>",
+      "message-url": "http://mid.gmane.org/{message-id}"
+    },
+    "views": [
+      {
+        "title": "Bugs",
+        "comment": "Unresolved bugs.",
+        "query": [
+          "tag:notmuch::bug",
+          "not tag:notmuch::fixed",
+          "not tag:notmuch::wontfix"
+        ]
+      },
+      {
+        "title": "Review",
+        "comment": "These patches are under review, or waiting for feedback.",
+        "id": "under-review",
+        "query": [
+          "tag:notmuch::patch",
+          "not tag:notmuch::pushed",
+          "not tag:notmuch::obsolete",
+          "not tag:notmuch::stale",
+          "not tag:notmuch::wontfix",
+          "(tag:notmuch::moreinfo or tag:notmuch::needs-review)"
+        ]
+      }
+    ]
+  }
+
+FILES
+=====
+
+If ``--config PATH`` is not set, ``nmbug-status`` will attempt to load
+a config file named ``status-config.json`` from the ``config`` branch
+of the ``NMBGIT`` repository (defaulting to ``~/.nmbug``).
+
+SEE ALSO
+========
+
+**notmuch(1)**, **notmuch-search(1)**, **notmuch-tag(1)**
-- 
2.1.0.60.g85f0837

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH 4/5] nmbug-status: Wrap query phrases in parentheses when and-ing together
  2015-12-30 19:16 [PATCH 0/5] nmbug-status: meta.message-url, man page, and query parens W. Trevor King
                   ` (2 preceding siblings ...)
  2015-12-30 19:16 ` [PATCH 3/5] nmbug-status: Add an nmbug-status(5) man page W. Trevor King
@ 2015-12-30 19:16 ` W. Trevor King
  2015-12-31 16:47   ` W. Trevor King
  2015-12-30 19:17 ` [PATCH 5/5] status-config.json: Remove parens from query entry W. Trevor King
  4 siblings, 1 reply; 15+ messages in thread
From: W. Trevor King @ 2015-12-30 19:16 UTC (permalink / raw)
  To: notmuch; +Cc: David Bremner, Tomi Ollila, Jani Nikula, Carl Worth,
	W. Trevor King

For example:

  "query": ["tag:a", "tag:b or tag:c"]

is now converted to:

  ( tag:a ) and ( tag:b or tag:c )

instead of the old:

  tag:a and tag:b or tag:c

This helps us avoid confusion due to Xapian's higher-precedence AND
[1], where the old query would be interpreted as:

  ( tag:a and tag:b ) or tag:c

[1]: http://xapian.org/docs/queryparser.html
---
 NEWS                     | 3 +++
 devel/nmbug/nmbug-status | 3 ++-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/NEWS b/NEWS
index 9a6a757..1c618d1 100644
--- a/NEWS
+++ b/NEWS
@@ -9,6 +9,9 @@ A new `nmbug-status(5)` describes `nmbug-status`'s JSON config file.
 nmbug-status
 ------------
 
+`nmbug-status` now wraps query phrases in parentheses when and-ing
+them together, to avoid confusion about clause grouping.
+
 `nmbug-status` now supports `meta.message-url` to override the Gmane
 template.  For example, you can use:
 
diff --git a/devel/nmbug/nmbug-status b/devel/nmbug/nmbug-status
index 336d0d2..a477af8 100755
--- a/devel/nmbug/nmbug-status
+++ b/devel/nmbug/nmbug-status
@@ -167,7 +167,8 @@ class Page (object):
                 view['title'], sort_key))
         if 'query-string' not in view:
             query = view['query']
-            view['query-string'] = ' and '.join(query)
+            view['query-string'] = ' and '.join(
+                '( {} )'.format(q) for q in query)
         q = notmuch.Query(database, view['query-string'])
         q.set_sort(sort)
         threads = self._get_threads(messages=q.search_messages())
-- 
2.1.0.60.g85f0837

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH 5/5] status-config.json: Remove parens from query entry
  2015-12-30 19:16 [PATCH 0/5] nmbug-status: meta.message-url, man page, and query parens W. Trevor King
                   ` (3 preceding siblings ...)
  2015-12-30 19:16 ` [PATCH 4/5] nmbug-status: Wrap query phrases in parentheses when and-ing together W. Trevor King
@ 2015-12-30 19:17 ` W. Trevor King
  4 siblings, 0 replies; 15+ messages in thread
From: W. Trevor King @ 2015-12-30 19:17 UTC (permalink / raw)
  To: notmuch; +Cc: David Bremner, Tomi Ollila, Jani Nikula, Carl Worth,
	W. Trevor King

These are now added by nmbug-status.
---
 devel/nmbug/status-config.json | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/devel/nmbug/status-config.json b/devel/nmbug/status-config.json
index b926946..48b6f19 100644
--- a/devel/nmbug/status-config.json
+++ b/devel/nmbug/status-config.json
@@ -62,7 +62,7 @@
 		"not tag:notmuch::obsolete",
 		"not tag:notmuch::stale",
 		"not tag:notmuch::wontfix",
-		"(tag:notmuch::moreinfo or tag:notmuch::needs-review)"
+		"tag:notmuch::moreinfo or tag:notmuch::needs-review"
 	    ],
 	    "title": "Review"
 	}
-- 
2.1.0.60.g85f0837

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* Re: [PATCH 4/5] nmbug-status: Wrap query phrases in parentheses when and-ing together
  2015-12-30 19:16 ` [PATCH 4/5] nmbug-status: Wrap query phrases in parentheses when and-ing together W. Trevor King
@ 2015-12-31 16:47   ` W. Trevor King
  0 siblings, 0 replies; 15+ messages in thread
From: W. Trevor King @ 2015-12-31 16:47 UTC (permalink / raw)
  To: notmuch; +Cc: David Bremner, Tomi Ollila, Jani Nikula, Carl Worth

[-- Attachment #1: Type: text/plain, Size: 713 bytes --]

On Wed, Dec 30, 2015 at 11:16:59AM -0800, W. Trevor King wrote:
> @@ -167,7 +167,8 @@ class Page (object):
>                  view['title'], sort_key))
>          if 'query-string' not in view:
>              query = view['query']
> -            view['query-string'] = ' and '.join(query)
> +            view['query-string'] = ' and '.join(
> +                '( {} )'.format(q) for q in query)

This patch is missing a similar change around line 414 to handle:

  $ nmbug-status --get-query VIEW

I've queued that for v2.

Cheers,
Trevor

-- 
This email may be signed or encrypted with GnuPG (http://www.gnupg.org).
For more information, see http://en.wikipedia.org/wiki/Pretty_Good_Privacy

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH 3/5] nmbug-status: Add an nmbug-status(5) man page
       [not found]   ` <87ege26fi4.fsf@nikula.org>
@ 2015-12-31 17:39     ` David Bremner
  2015-12-31 20:28       ` W. Trevor King
  2016-01-01 11:23       ` Tomi Ollila
  0 siblings, 2 replies; 15+ messages in thread
From: David Bremner @ 2015-12-31 17:39 UTC (permalink / raw)
  To: Jani Nikula, W. Trevor King, notmuch

Jani Nikula <jani@nikula.org> writes:

> On Wed, 30 Dec 2015, "W. Trevor King" <wking@tremily.us> wrote:
>> To describe the config file format, so folks don't have to dig through
>> NEWS or the nmbug-status source to get that information.
>
> Overall I approve of the series (though I did not do a thorough
> review).
>
> I am wondering about the man page though. I find it slightly confusing
> there would be a man page named after the tool describing just the
> config, but not the tool itself.

For me it's a bit odd to have a man page for a tool we don't install by
default. Is it maybe time to "promote" nmbug-status to the notmuch-
namespace and install it by default? That would have to be somehow tied
to installing the python bindings; or else the script could just print a
helpful error message if the bindings are not found.

This would also allow addressing Tomi's comment about testing, by adding
a couple of tests to the test suite.

d

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH 3/5] nmbug-status: Add an nmbug-status(5) man page
  2015-12-31 17:39     ` David Bremner
@ 2015-12-31 20:28       ` W. Trevor King
  2015-12-31 22:11         ` David Bremner
  2016-01-01 11:23       ` Tomi Ollila
  1 sibling, 1 reply; 15+ messages in thread
From: W. Trevor King @ 2015-12-31 20:28 UTC (permalink / raw)
  To: David Bremner; +Cc: Jani Nikula, notmuch

[-- Attachment #1: Type: text/plain, Size: 2021 bytes --]

On Thu, Dec 31, 2015 at 01:39:21PM -0400, David Bremner wrote:
> Jani Nikula writes:
> > I am wondering about the man page though. I find it slightly
> > confusing there would be a man page named after the tool
> > describing just the config, but not the tool itself.

Yeah, a man page about the tool itself would be good.  If I add one,
we'd have a situation like procmail(1) and procmailrc(5).  One
difficulty for naming the config-file-format man page is that
status-config.json is not a particularly specific name.  If we're
renaming the tools anyway, I'd suggest we just go with
${EVENTUAL_NMBUG_STATUS_NAME}.json for the default config filename and
man page.

> For me it's a bit odd to have a man page for a tool we don't install
> by default. Is it maybe time to "promote" nmbug-status to the
> notmuch- namespace and install it by default?

Sounds good to me.  And Gentoo has installed it (if you've set the
‘nmbug’ USE flag [1]) since 0.11.1-r1, 2012-02-21 [2].  I'm not sure
what the new names should be.  nmbug → notmuch-dtag (for distributed
tag) and nmbug-status → notmuch-report?

> That would have to be somehow tied to installing the python
> bindings;

On Gentoo, that happens via REQUIRED_USE [3,4].  An alternative for
packaging systems without USE-flag-style flexibility would be to spin
them off into a separate project that depends on Git and notmuch's
Python bindings.

Cheers,
Trevor

[1]: https://gitweb.gentoo.org/repo/gentoo.git/tree/net-mail/notmuch/metadata.xml
[2]: https://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/net-mail/notmuch/ChangeLog?hideattic=0&revision=1.23&view=markup
[3]: https://gitweb.gentoo.org/repo/gentoo.git/tree/net-mail/notmuch/notmuch-0.21.ebuild?id=45ba77ab1dee61a2590c9f4903e620c5cf4d5f68#n23
[4]: https://projects.gentoo.org/pms/6/pms.html#x1-890008.2.7

-- 
This email may be signed or encrypted with GnuPG (http://www.gnupg.org).
For more information, see http://en.wikipedia.org/wiki/Pretty_Good_Privacy

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH 3/5] nmbug-status: Add an nmbug-status(5) man page
  2015-12-31 20:28       ` W. Trevor King
@ 2015-12-31 22:11         ` David Bremner
  2015-12-31 22:22           ` W. Trevor King
  0 siblings, 1 reply; 15+ messages in thread
From: David Bremner @ 2015-12-31 22:11 UTC (permalink / raw)
  To: W. Trevor King; +Cc: Jani Nikula, notmuch

"W. Trevor King" <wking@tremily.us> writes:

> On Thu, Dec 31, 2015 at 01:39:21PM -0400, David Bremner wrote:
>
>> For me it's a bit odd to have a man page for a tool we don't install
>> by default. Is it maybe time to "promote" nmbug-status to the
>> notmuch- namespace and install it by default?
>
> Sounds good to me.  And Gentoo has installed it (if you've set the
> ‘nmbug’ USE flag [1]) since 0.11.1-r1, 2012-02-21 [2].  I'm not sure
> what the new names should be.  nmbug → notmuch-dtag (for distributed
> tag) and nmbug-status → notmuch-report?
>

I'm not sure we need to deal with both tools in lockstep. It's not like
there's an actual dependence of nmbug-status on nmbug. 

>> That would have to be somehow tied to installing the python
>> bindings;
>
> On Gentoo, that happens via REQUIRED_USE [3,4].  An alternative for
> packaging systems without USE-flag-style flexibility would be to spin
> them off into a separate project that depends on Git and notmuch's
> Python bindings.
>

Yes, these things are easy to solve in most packaging systems, but we
want notmuch to be installable from source as well. 

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH 3/5] nmbug-status: Add an nmbug-status(5) man page
  2015-12-31 22:11         ` David Bremner
@ 2015-12-31 22:22           ` W. Trevor King
  2016-01-01 12:17             ` David Bremner
  0 siblings, 1 reply; 15+ messages in thread
From: W. Trevor King @ 2015-12-31 22:22 UTC (permalink / raw)
  To: David Bremner; +Cc: Jani Nikula, notmuch

[-- Attachment #1: Type: text/plain, Size: 1722 bytes --]

On Thu, Dec 31, 2015 at 06:11:34PM -0400, David Bremner wrote:
> W. Trevor King writes:
> > On Thu, Dec 31, 2015 at 01:39:21PM -0400, David Bremner wrote:
> >> For me it's a bit odd to have a man page for a tool we don't
> >> install by default. Is it maybe time to "promote" nmbug-status to
> >> the notmuch- namespace and install it by default?
> >
> > Sounds good to me.  And Gentoo has installed it (if you've set the
> > ‘nmbug’ USE flag [1]) since 0.11.1-r1, 2012-02-21 [2].  I'm not
> > sure what the new names should be.  nmbug → notmuch-dtag (for
> > distributed tag) and nmbug-status → notmuch-report?
>
> I'm not sure we need to deal with both tools in lockstep. It's not
> like there's an actual dependence of nmbug-status on nmbug.

Agreed.  I think they're both pretty useful though, and I don't see a
point to *not* promoting one to “easy to install with an appropriately
generic name”.  However, I'm fine promoting the tools in two separate
patch series if that would be easier to review.

> Yes, these things are easy to solve in most packaging systems, but
> we want notmuch to be installable from source as well.

So separate --without-… configure flags for each script, which will
also control the associated man pages and handle runtime-dependency
warnings/errors?

Looking over our current configure, I see we have a --without-ruby,
but no --without-python.  I may file a separate patch adding that, so
folks with Python installed can still opt-out of notmuch's Python
bindings.

Cheers,
Trevor

-- 
This email may be signed or encrypted with GnuPG (http://www.gnupg.org).
For more information, see http://en.wikipedia.org/wiki/Pretty_Good_Privacy

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH 3/5] nmbug-status: Add an nmbug-status(5) man page
  2015-12-31 17:39     ` David Bremner
  2015-12-31 20:28       ` W. Trevor King
@ 2016-01-01 11:23       ` Tomi Ollila
  2016-01-01 12:18         ` David Bremner
  2016-01-01 17:55         ` W. Trevor King
  1 sibling, 2 replies; 15+ messages in thread
From: Tomi Ollila @ 2016-01-01 11:23 UTC (permalink / raw)
  To: David Bremner, Jani Nikula, W. Trevor King, notmuch

On Thu, Dec 31 2015, David Bremner <david@tethera.net> wrote:

> Jani Nikula <jani@nikula.org> writes:
>
>> On Wed, 30 Dec 2015, "W. Trevor King" <wking@tremily.us> wrote:
>>> To describe the config file format, so folks don't have to dig through
>>> NEWS or the nmbug-status source to get that information.
>>
>> Overall I approve of the series (though I did not do a thorough
>> review).
>>
>> I am wondering about the man page though. I find it slightly confusing
>> there would be a man page named after the tool describing just the
>> config, but not the tool itself.
>
> For me it's a bit odd to have a man page for a tool we don't install by
> default. Is it maybe time to "promote" nmbug-status to the notmuch-
> namespace and install it by default? That would have to be somehow tied
> to installing the python bindings; or else the script could just print a
> helpful error message if the bindings are not found.
>
> This would also allow addressing Tomi's comment about testing, by adding
> a couple of tests to the test suite.

What we could simply have at the time being:

  devel/nmbug/nmbug
  devel/nmbug/nmbug.rst (or .1)
  devel/nmbug/nmbug-status
  devel/nmbug/nmbug-status.rst (or .1)
  devel/nmbug/nmbug-status-config
  devel/nmbug/nmbug-status-config.rst (or .5)

(and if .rst:s, a Makefile to build the namual pages)

The responsibility to install the tools could be
outside of notmuch for now...

Tomi

>
> d

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH 3/5] nmbug-status: Add an nmbug-status(5) man page
  2015-12-31 22:22           ` W. Trevor King
@ 2016-01-01 12:17             ` David Bremner
  0 siblings, 0 replies; 15+ messages in thread
From: David Bremner @ 2016-01-01 12:17 UTC (permalink / raw)
  To: W. Trevor King; +Cc: Jani Nikula, notmuch

"W. Trevor King" <wking@tremily.us> writes:

> So separate --without-… configure flags for each script, which will
> also control the associated man pages and handle runtime-dependency
> warnings/errors?

Or just have e.g. the nmbug-status install depend on the hypothetical
--without-python flag.  

>
> Looking over our current configure, I see we have a --without-ruby,
> but no --without-python.  I may file a separate patch adding that, so
> folks with Python installed can still opt-out of notmuch's Python
> bindings.

That seems sensible in any case. Although we'd have to double check that
the build itself doesn't depend on python.  It might make sense to
distinguish between the python bindings (needed for nmbug-status) and
python itself, needed for the test-suite (at least) and nmbug.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH 3/5] nmbug-status: Add an nmbug-status(5) man page
  2016-01-01 11:23       ` Tomi Ollila
@ 2016-01-01 12:18         ` David Bremner
  2016-01-01 17:55         ` W. Trevor King
  1 sibling, 0 replies; 15+ messages in thread
From: David Bremner @ 2016-01-01 12:18 UTC (permalink / raw)
  To: Tomi Ollila, Jani Nikula, W. Trevor King, notmuch

Tomi Ollila <tomi.ollila@iki.fi> writes:

>
> What we could simply have at the time being:
>
>   devel/nmbug/nmbug
>   devel/nmbug/nmbug.rst (or .1)
>   devel/nmbug/nmbug-status
>   devel/nmbug/nmbug-status.rst (or .1)
>   devel/nmbug/nmbug-status-config
>   devel/nmbug/nmbug-status-config.rst (or .5)
>
> (and if .rst:s, a Makefile to build the namual pages)
>
> The responsibility to install the tools could be
> outside of notmuch for now...

This simpler option is also fine with me, and would be faster to review
and apply.

d

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH 3/5] nmbug-status: Add an nmbug-status(5) man page
  2016-01-01 11:23       ` Tomi Ollila
  2016-01-01 12:18         ` David Bremner
@ 2016-01-01 17:55         ` W. Trevor King
  1 sibling, 0 replies; 15+ messages in thread
From: W. Trevor King @ 2016-01-01 17:55 UTC (permalink / raw)
  To: Tomi Ollila; +Cc: David Bremner, Jani Nikula, notmuch

[-- Attachment #1: Type: text/plain, Size: 1229 bytes --]

On Fri, Jan 01, 2016 at 01:23:37PM +0200, Tomi Ollila wrote:
> What we could simply have at the time being:
> 
>   devel/nmbug/nmbug
>   devel/nmbug/nmbug.rst (or .1)
>   devel/nmbug/nmbug-status
>   devel/nmbug/nmbug-status.rst (or .1)
>   devel/nmbug/nmbug-status-config
>   devel/nmbug/nmbug-status-config.rst (or .5)
> 
> (and if .rst:s, a Makefile to build the namual pages)

This is closer to my “separate project” idea [1], and works for me as
far as this series goes.  By not providing install tooling, we also
avoid David's concern about strongly linking the independent tools
[2].  I'll push something like it in a v2.

Once we land that, I may file a subsequent series renaming the scripts
and configs to something more general.  But we can hash that out in
that series' thread.

Cheers,
Trevor

[1]: http://thread.gmane.org/gmane.mail.notmuch.general/21535/focus=21536
     id:20151231202815.GL3680@odin.tremily.us
[2]: http://thread.gmane.org/gmane.mail.notmuch.general/21535/focus=21537
     id:87d1tm46ax.fsf@zancas.localnet

-- 
This email may be signed or encrypted with GnuPG (http://www.gnupg.org).
For more information, see http://en.wikipedia.org/wiki/Pretty_Good_Privacy

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2016-01-01 17:57 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-30 19:16 [PATCH 0/5] nmbug-status: meta.message-url, man page, and query parens W. Trevor King
2015-12-30 19:16 ` [PATCH 1/5] NEWS: Remove trailing comma from an old nmbug-status config W. Trevor King
2015-12-30 19:16 ` [PATCH 2/5] nmbug-status: Add meta.message-url config setting W. Trevor King
2015-12-30 19:16 ` [PATCH 3/5] nmbug-status: Add an nmbug-status(5) man page W. Trevor King
     [not found]   ` <87ege26fi4.fsf@nikula.org>
2015-12-31 17:39     ` David Bremner
2015-12-31 20:28       ` W. Trevor King
2015-12-31 22:11         ` David Bremner
2015-12-31 22:22           ` W. Trevor King
2016-01-01 12:17             ` David Bremner
2016-01-01 11:23       ` Tomi Ollila
2016-01-01 12:18         ` David Bremner
2016-01-01 17:55         ` W. Trevor King
2015-12-30 19:16 ` [PATCH 4/5] nmbug-status: Wrap query phrases in parentheses when and-ing together W. Trevor King
2015-12-31 16:47   ` W. Trevor King
2015-12-30 19:17 ` [PATCH 5/5] status-config.json: Remove parens from query entry W. Trevor King

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).