1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-29 23:24:55 +02:00
tldr/pages/common/emacsclient.md

30 lines
906 B
Markdown
Raw Normal View History

2017-12-28 15:30:04 +05:30
# emacsclient
2021-06-15 00:27:30 +02:00
> Open files in an existing Emacs server.
> See also `emacs`.
> More information: <https://www.gnu.org/software/emacs/manual/html_node/emacs/emacsclient-Options.html>.
2017-12-28 15:30:04 +05:30
2021-06-15 00:27:30 +02:00
- Open a file in an existing Emacs server (using GUI if available):
2018-01-03 14:12:26 +05:30
2021-06-15 00:27:30 +02:00
`emacsclient {{path/to/file}}`
2018-01-03 14:12:26 +05:30
2021-06-15 00:27:30 +02:00
- Open a file in console mode (without an X window):
2017-12-28 15:30:04 +05:30
`emacsclient {{[-nw|--no-window-system]}} {{path/to/file}}`
2017-12-28 15:30:04 +05:30
2021-06-15 00:27:30 +02:00
- Open a file in a new Emacs window:
2017-12-28 15:30:04 +05:30
`emacsclient {{[-c|--create-frame]}} {{path/to/file}}`
2020-07-18 04:17:43 +08:00
- Evaluate a command, printing the output to `stdout`, and then quit:
2020-07-18 04:17:43 +08:00
`emacsclient {{[-e|--eval]}} '({{command}})'`
2020-07-18 04:17:43 +08:00
2021-06-15 00:27:30 +02:00
- Specify an alternative editor in case no Emacs server is running:
2020-07-18 04:17:43 +08:00
`emacsclient {{[-a|--alternate-editor]}} {{editor}} {{path/to/file}}`
2021-06-15 00:27:30 +02:00
- Stop a running Emacs server and all its instances, asking for confirmation on unsaved files:
`emacsclient {{[-e|--eval]}} '(save-buffers-kill-emacs)'`