Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/xuchunyang/another-emacs-server

An Emacs server built on HTTP and JSON
https://github.com/xuchunyang/another-emacs-server

Last synced: about 1 month ago
JSON representation

An Emacs server built on HTTP and JSON

Awesome Lists containing this project

README

        

# An Emacs server built on HTTP and JSON

The builtin Emacs server is built on Unix domain socket, `another-emacs-server`
is builton HTTP and JSON. Because the response is JSON, it's easy and reliable
for other tool to consume.

## Usage

Run `M-x another-emacs-server` to start the server. Send

- `{"eval": "expr"}` to eval an expression
- `{"file": ["filename1", "filename2", ...]}` to open files

For example,

~ $ curl -s -d '{"eval": "emacs-version"}' -H "Content-Type: application/json" localhost:7777 | jq
{
"result": "27.0.90"
}

~ $ curl -s -d '{"file": ["/etc/hosts"]}' -H "Content-Type: application/json" localhost:7777 | jq
{
"result": "OK"
}

## Requires

- Emacs 25.1
- web-server 20200312