]> src.twobees.de Git - dotfiles.git/blob - stow/oh-my-zsh/.oh-my-zsh/plugins/emacs/README.md
c8e33b5ab485428fb6ec83b3525513bc6422dc42
[dotfiles.git] / stow / oh-my-zsh / .oh-my-zsh / plugins / emacs / README.md
1 # Emacs plugin
2
3 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.
4
5 - You don't have the cost of starting Emacs all the time anymore
6 - Opening a file is as fast as Emacs does not have anything else to do.
7 - You can share opened buffered across opened frames.
8 - Configuration changes made at runtime are applied to all frames.
9
10 **NOTE:** requires Emacs 24 and newer.
11
12 To use it, add emacs to the plugins array in your zshrc file:
13
14 ```zsh
15 plugins=(... emacs)
16 ```
17
18 ## Aliases
19
20 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).
21
22 | Alias  | Command                                            | Description                                                    |
23 |--------|----------------------------------------------------|----------------------------------------------------------------|
24 | emacs  | `$EMACS_LAUNCHER --no-wait`                        | Opens a temporary emacsclient frame                            |
25 | e      | `emacs`                                            | Same as emacs alias                                            |
26 | te     | `$EMACS_LAUNCHER -nw`                              | Open terminal emacsclient                                      |
27 | eeval  | `$EMACS_LAUNCHER --eval`                           | Same as `M-x eval` but from outside Emacs                      |
28 | eframe | `emacsclient --alternate-editor "" --create-frame` | Create new X frame                                             |
29 | efile  | -                                                  | Print the path to the file open in the current buffer          |
30 | ecd    | -                                                  | Print the directory of the file open in the the current buffer |