peek-mode

Homepage: https://github.com/erikriverson/peek-mode

Author: Erik Iverson

Updated:

Summary

Serve buffers live over HTTP with elnode backend

Commentary

peek-mode is a minor mode that publishes live Emacs buffers through
an elnode server under
http://:/peek/. Turning on peek-mode in a
buffer will publish it. To unpublish a buffer, toggle peek-mode
off.
 
peek-mode is (very very!) largely based on Brian Taylor's
 impatient-mode
 However, impatient-mode does
not use elnode, but rather a different emacs httpd backend
. I consider peek-mode
as "impatient-mode ported to elnode".
 
Start the elnode server (`elnode-start') and visit
http://:/peek/. There will be a listing of all the
buffers that currently have peek-mode enabled. You can evaluate the
line below to start the elnode server on localhost:8008 with the
proper dispatcher, assuming the code in this file is available by
having loaded it. 
(elnode-start 'peek-mode-dispatcher-handler :port 8008 :host "localhost")

Because html-mode buffers are sent raw, you can use peek-mode
see your edits to an HTML document live!
 
To receive updates the browser issues a long poll on the client
waiting for the buffer to change -- server push. The response
happens in an `after-change-functions' hook. Buffers that do not
run these hooks will not be displayed live to clients.

Dependencies