Cool OCaml-based web-frontend for Emacs org-files

Hey everyone! It’s been a while. Here’s a little thing I’ve been working on that I thought might be interesting for this community: Emacs-viewer

This is a simple application that presents a web frontend for your org files in Emacs. Internally, it’s written using Dream for the server and Bonsai for the web frontend.

The high level idea is that the backend uses the emacsclient command to interact with your emacs process, using it to parse and process an org-mode buffer. The data from emacs, which is returned as a s-expression, is parsed by the backend into a common representation shared between the backend and the frontend. The frontend then renders this in a prettified format.

full-text-search

Wrapping my head around Bonsai took me a bit of time - somewhat suprisingly, even though I’ve spent a bit of time hacking on note-based web frontends, bonsai’s encoding ends up necessitating quite a different style of development and requires organising components in fairly different ways to which I was used to.

When I get the time I hope to write up a blog post on a quick start on both of these frameworks, because I haven’t found a satisfactory zero-to-working-example guide for either of these frameworks

Anyway, happy to field any questions, or feel free to look at the code (more gifs at the repo):

Here’s another cool gif of a tag-based search field, which was probably my first actually reusable non-trivial bonsai component:

tag-support

13 Likes