notmuch webmails
John Lenz
lenz at math.uic.edu
Tue Feb 19 20:45:34 PST 2013
On 2013-02-19 15:50:05 UTC, Nicolas Pouillard <np at nicolaspouillard.fr> wrote:
> Quoting David Bremner (2013-02-17 14:19:55)
> > Nicolas Pouillard <np at nicolaspouillard.fr> writes:
> >
> > > Quoting John Lenz (2013-02-16 19:07:47)
> >
> > >> Hi, I am working on one as well, but am further along. I am starting
> > >> to use it as my main interface. I have table view of messages, a
> > >> pager view, tagging and retagging, compose, compose with attachments,
> > >> etc. Combined with the "Its All Text" firefox plugin, it works
> > >> pretty well. I was planning on announcing in a week or so, but here
> > >> is the code since this thread showed up. I will work on some
> > >> instructions on how to set it up soon, plus a little cleanup.
> > >>
> > >> https://bitbucket.org/wuzzeb/notmuch-web/src
> > >
> > > Wow in Haskell! I'm looking forward to try/use it.
> >
> > Interesting. I see you are calling out to the CLI. Ben Gamari (in CC)
> > was working on some Haskell bindings; I'm not sure how far he got. I
> > think there were some conflicts between the memory models of talloc and
> > Haskell.
>
> Calling the CLI has been of a direct use for me to run the webapp on a
> different machine by simply having notmuch as a script using ssh.
>
Yes, parsing the JSON from the CLI is pretty easy so I don't see much benefit
to using a direct binding.
The only main issue I am still trying to work out is how to deal with flowed
messages. I think for viewing, if there is a html alternative, I will use
xss-sanatize (http://hackage.haskell.org/package/xss-sanitize) with perhaps
some additional filtering for images and such. The problem is format=flowed
messages: the JSON from the CLI does not have the format=flowed header
anywhere in the JSON. The message body still has spaces at the end of flowed
lines, so if we knew that the message was flowed we could parse the spaces
in haskell. Alternatively, I have been considering enhancing notmuch itself
to parse the flowed text into paragraphs and stick it into the JSON. For
compose, I just need to enhance the mime-mail package to send flowed
text, but will have to figure out how to round-trip the reply text through
the textbox.
More information about the notmuch
mailing list