e09eb23158c7c75b84b7dafb514dcfa86bd06dc3

Author
Martin Nestorov <mdinestorov@gmail.com>
Committer
Marc Cornellà <marc.cornella@live.com>
Date

Message

emacs: add README (#7235)

Diff

 1diff --git a/plugins/emacs/README.md b/plugins/emacs/README.md
 2new file mode 100644
 3index 0000000000000000000000000000000000000000..c8e33b5ab485428fb6ec83b3525513bc6422dc42
 4--- /dev/null
 5+++ b/plugins/emacs/README.md
 6@@ -0,0 +1,30 @@
 7+# Emacs plugin
 8+
 9+This plugin utilizes the Emacs daemon capability, allowing the user to quickly open frames, whether they are opened in a terminal via a ssh connection, or X frames opened on the same host. The plugin also provides some aliases for such operations.
10+
11+- You don't have the cost of starting Emacs all the time anymore
12+- Opening a file is as fast as Emacs does not have anything else to do.
13+- You can share opened buffered across opened frames.
14+- Configuration changes made at runtime are applied to all frames.
15+
16+**NOTE:** requires Emacs 24 and newer.
17+
18+To use it, add emacs to the plugins array in your zshrc file:
19+
20+```zsh
21+plugins=(... emacs)
22+```
23+
24+## Aliases
25+
26+The plugin uses a custom launcher (which we'll call here `$EMACS_LAUNCHER`) that is just a wrapper around [`emacsclient`](https://www.emacswiki.org/emacs/EmacsClient).
27+
28+| Alias  | Command                                            | Description                                                    |
29+|--------|----------------------------------------------------|----------------------------------------------------------------|
30+| emacs  | `$EMACS_LAUNCHER --no-wait`                        | Opens a temporary emacsclient frame                            |
31+| e      | `emacs`                                            | Same as emacs alias                                            |
32+| te     | `$EMACS_LAUNCHER -nw`                              | Open terminal emacsclient                                      |
33+| eeval  | `$EMACS_LAUNCHER --eval`                           | Same as `M-x eval` but from outside Emacs                      |
34+| eframe | `emacsclient --alternate-editor "" --create-frame` | Create new X frame                                             |
35+| efile  | -                                                  | Print the path to the file open in the current buffer          |
36+| ecd    | -                                                  | Print the directory of the file open in the the current buffer |