unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Brian Sniffen <bts@evenmere.org>
To: Daniel Kahn Gillmor <dkg@fifthhorseman.net>,
	Vladimir Panteleev <thecybershadow@gmail.com>,
	Jani Nikula <jani@nikula.org>,
	Matthew Lear <matt@bubblegen.co.uk>,
	notmuch@notmuchmail.org
Subject: Re: web interface to notmuch
Date: Fri, 27 Oct 2017 00:04:21 -0400	[thread overview]
Message-ID: <87she5nsmy.fsf@istari.evenmere.org> (raw)
In-Reply-To: <877evhy53k.fsf@fifthhorseman.net>

Daniel Kahn Gillmor <dkg@fifthhorseman.net> writes:

> On Wed 2017-10-25 18:03:01 -0400, Brian Sniffen wrote:
>> That's inspiring!  Now there's a demo of nmweb at
>>
>> https://nmweb.evenmere.org/
>
> this is very nice, Brian.

Thanks!  The part I'm happiest about is the speed: this is as fast as I
remember gmail being.  The Secret Ingredient is HTTP chunked encoding,
accessed through web.py's generators, and careful page design---almost
every byte from the server is renderable as it arrives, and later bytes
never disrupt placement of earlier objects.

> Your URL highlighter seems a bit trigger-happy though:
>
>    https://nmweb.evenmere.org/show/8760s7zr47.fsf%40zancas.localnet
>
> I don't think bremner was trying to link to http://index.cc !

As a wise soul once told me, use a library and then blame them.  This is
the Mozilla Bleach library, used for both sanitizing text/html parts and
for linkifying text/plain parts.  But since that supports filtering:
sure, this can only linkify things starting with 'http[s]://'

>> It's possible to get it to dump the whole mbox by clicking through the
>> obvious links; please consider exploring at
>> https://nmweb.evenmere.org/search/monkey instead.
>
> this is interesting because it shows me threads where some messages have
> monkey in them, but i can't tell which messages actually have the
> relevant search term.  Maybe it could highlight the found messages?

Very careful examination would have shown that the em-dashes between
author and subject were red for matches.  Now matches are in italics.

> Also, once i'm looking at one message, i don't see an easy way to go
> "next" in the thread.

Yup.  The thread object isn't accessible by then: it existed in the
scope of the search query, and is gone by the time we show the message.
get_replies isn't available.  So what's the alternative?
get_thread_id(), search for that thread id, identify this message *in*
that thread id, and then link to the next message with a "next" link?
While doing it, why not show the thread structure at the bottom of the
message, I guess.

With bleach integrated (all of five lines), I think this is safe enough
to let random notmuch users run it.  The worst they'll do is expose
their mailstore on tcp/8080.  Any interest in taking this into the
upstream contrib directory?

-Brian

  reply	other threads:[~2017-10-27  4:04 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-19 14:43 web interface to notmuch Matthew Lear
2017-10-19 15:01 ` Brian Sniffen
2017-10-19 16:55   ` Daniel Kahn Gillmor
2017-10-19 20:00     ` Brian Sniffen
2017-10-19 20:13       ` Daniel Kahn Gillmor
2017-10-21 20:00     ` Jani Nikula
2017-10-21 22:21       ` Daniel Kahn Gillmor
2017-10-24 12:39         ` Vladimir Panteleev
     [not found]         ` <27e53def-32b4-45ab-1192-77cc0e837a93@gmail.com>
2017-10-24 20:03           ` Matthew Lear
2017-10-25 22:03           ` Brian Sniffen
2017-10-26 21:25             ` Daniel Kahn Gillmor
2017-10-27  4:04               ` Brian Sniffen [this message]
2017-10-27  4:24                 ` Daniel Kahn Gillmor
2017-10-27 10:02                   ` Matthew Lear
2017-10-27  6:05                 ` Daniel Kahn Gillmor
2017-10-27 17:52                   ` Brian Sniffen
2017-10-31 17:13                     ` Matthew Lear
2017-10-31 18:47                       ` Tomas Nordin
2017-10-31 19:21                       ` Brian Sniffen
2017-10-31 21:32                         ` Matthew Lear
2017-11-01 13:01                           ` Matthew Lear
2017-11-01 14:38                           ` Brian Sniffen
2017-11-02 17:32                             ` Matthew Lear
2017-12-06 15:00     ` Brian Sniffen
2017-12-06 19:13       ` Daniel Kahn Gillmor
2017-12-07  1:00       ` David Bremner
2017-10-20 19:25 ` W. Trevor King

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=87she5nsmy.fsf@istari.evenmere.org \
    --to=bts@evenmere.org \
    --cc=dkg@fifthhorseman.net \
    --cc=jani@nikula.org \
    --cc=matt@bubblegen.co.uk \
    --cc=notmuch@notmuchmail.org \
    --cc=thecybershadow@gmail.com \
    /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).