a temporary nmweb view of notmuch mailing list archive

Daniel Kahn Gillmor dkg at fifthhorseman.net
Thu Feb 15 15:42:55 PST 2018


On Thu 2018-02-15 15:47:21 -0500, Brian Sniffen wrote:
> show_thread_nav = True , and take through https://github.com/briansniffen/notmuch/commit/021c914fc5cc1029778794cc5630373041066889

ah, i'd missed some of your commits, apparently.  thanks for the
pointer.  https://notmuchmail.org/btsmail is now running my merged changes.


We're moving in the right direction!  Since i pulled these in and made a
few more changes, we've now got the following:

 * we have a threaded view from each message

 * nmweb is configurable via the environment, no need to tweak config in
   the code itself


I've also just opened a pull request on github for you to merge my
cleanup, if you're interested:

    https://github.com/briansniffen/notmuch/pull/1

We're going to need to do some git history cleanup eventually if we want
this merged on the notmuch mainline, but i figure it'd be better if we
sync up earlier rather than later :)


for the record, there are a few errors i'm seeing now from poking around
on nmweb.  in particular, i get an error here in the tree walk when
looking at what appears to be a bounced e-mail (the fact that bounced
e-mails probably shouldn't show up in this archive is a separate bug):

    https://nmbug.notmuchmail.org/btsmail/show/E1ehr4h-0000Dc-0w%40nmbug

Feb 15 18:27:13 nmbug gunicorn3[30460]: Traceback (most recent call last):
Feb 15 18:27:13 nmbug gunicorn3[30460]:   File "/usr/lib/python3/dist-packages/web/application.py", line 257, in process
Feb 15 18:27:13 nmbug gunicorn3[30460]:     return self.handle()
Feb 15 18:27:13 nmbug gunicorn3[30460]:   File "/usr/lib/python3/dist-packages/web/application.py", line 248, in handle
Feb 15 18:27:13 nmbug gunicorn3[30460]:     return self._delegate(fn, self.fvars, args)
Feb 15 18:27:13 nmbug gunicorn3[30460]:   File "/usr/lib/python3/dist-packages/web/application.py", line 488, in _delegate
Feb 15 18:27:13 nmbug gunicorn3[30460]:     return handle_class(cls)
Feb 15 18:27:13 nmbug gunicorn3[30460]:   File "/usr/lib/python3/dist-packages/web/application.py", line 466, in handle_class
Feb 15 18:27:13 nmbug gunicorn3[30460]:     return tocall(*args)
Feb 15 18:27:13 nmbug gunicorn3[30460]:   File "/home/nmweb/notmuch/contrib/notmuch-web/nmweb.py", line 172, in GET
Feb 15 18:27:13 nmbug gunicorn3[30460]:     sprefix=webprefix)
Feb 15 18:27:13 nmbug gunicorn3[30460]:   File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 989, in render
Feb 15 18:27:13 nmbug gunicorn3[30460]:     return self.environment.handle_exception(exc_info, True)
Feb 15 18:27:13 nmbug gunicorn3[30460]:   File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 754, in handle_exception
Feb 15 18:27:13 nmbug gunicorn3[30460]:     reraise(exc_type, exc_value, tb)
Feb 15 18:27:13 nmbug gunicorn3[30460]:   File "/usr/lib/python3/dist-packages/jinja2/_compat.py", line 37, in reraise
Feb 15 18:27:13 nmbug gunicorn3[30460]:     raise value.with_traceback(tb)
Feb 15 18:27:13 nmbug gunicorn3[30460]:   File "templates/show.html", line 1, in top-level template code
Feb 15 18:27:13 nmbug gunicorn3[30460]:     {% extends "base.html" %}
Feb 15 18:27:13 nmbug gunicorn3[30460]:   File "templates/base.html", line 32, in top-level template code
Feb 15 18:27:13 nmbug gunicorn3[30460]:     {% block content %}
Feb 15 18:27:13 nmbug gunicorn3[30460]:   File "templates/show.html", line 12, in block "content"
Feb 15 18:27:13 nmbug gunicorn3[30460]:     {% for part in format_message(m.get_filename(),mid): %}{{ part|safe }}{% endfor %}
Feb 15 18:27:13 nmbug gunicorn3[30460]:   File "/home/nmweb/notmuch/contrib/notmuch-web/nmweb.py", line 241, in format_message_walk
Feb 15 18:27:13 nmbug gunicorn3[30460]:     parts.pop()
Feb 15 18:27:13 nmbug gunicorn3[30460]: IndexError: pop from empty list



Also, i noticed that just searching by date (with no terms) fails
with a Xapian error because " date:…" gets quote_plus'ed to "+date:…"
and notmuch gets confused by the leading "+" -- maybe we're missing an
unquote_plus or something?



Finally, we're clearly not escaping the subject lines correctly.  Look
at the threading here:

    https://nmbug.notmuchmail.org/btsmail/show/cover.1392309570.git.wking%40tremily.us


Does anyone have a preference for the URL to use for more permanent
web-based view of the mailing list archive?

thanks for this work, Brian!

       --dkg
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 227 bytes
Desc: not available
URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20180215/66d7da48/attachment.sig>


More information about the notmuch mailing list