-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathREADME
33 lines (25 loc) · 1.24 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
el-sprunge
command line paste server with Emacs highlighting
Run the server with the following.
make start
Optionally set a number of properties of the server through
environment variables passed to make.
The following environment variables are recognized.
EMACS ---- change the Emacs executable used to run the server
PORT ----- port on which the server will listen for connections
SERVER --- server name
THEME ---- Emacs color theme used for fontified pastes
DOCROOT -- directory in which to store pastes
Requires Emacs 24.3, my Emacs Web Server [1], and Htmlize [2].
[1] https://github.com/eschulte/emacs-web-server
[2] http://fly.srk.fer.hr/~hniksic/emacs/htmlize.el.cgi
The `el-sprunge-after-save-hook' may be used to run actions on every
pasted file. For example evaluating the following in the running
Emacs server commits every new paste to a version control repository.
(require 'vc)
(defun el-sprunge-vc-add ()
(ignore-errors
(let ((file (buffer-file-name (current-buffer))))
(unless (vc-backend file) (vc-register))
(vc-checkin (list file) (vc-backend file) nil "a paste"))))
(add-hook 'el-sprunge-after-save-hook 'el-sprunge-vc-add)