1 ;;; current-buffer.el --- Show the current Emacs buffer
2 ;; Copyright (C) 2014 Free Software Foundation, Inc.
8 (with-slots (process headers) request
9 (ws-response-header process 200
10 '("Content-type" . "text/html; charset=utf-8"))
11 (process-send-string process
12 (let ((html-buffer (htmlize-buffer)))
13 (prog1 (with-current-buffer html-buffer (buffer-string))
14 (kill-buffer html-buffer))))))