tldr/pages/common/emacs.md

34 lines
718 B
Markdown
Raw Permalink Normal View History

2015-12-30 13:14:38 +00:00
# emacs
> The extensible, customizable, self-documenting, real-time display editor.
2021-06-14 23:27:30 +01:00
> See also `emacsclient`.
2019-06-08 01:04:00 +01:00
> More information: <https://www.gnu.org/software/emacs>.
2015-12-30 13:14:38 +00:00
2021-06-14 23:27:30 +01:00
- Start Emacs and open a file:
2015-12-30 13:14:38 +00:00
2021-06-14 23:27:30 +01:00
`emacs {{path/to/file}}`
2015-12-29 23:11:42 +00:00
2021-06-14 23:27:30 +01:00
- Open a file at a specified line number:
2015-12-29 23:11:42 +00:00
2021-06-14 23:27:30 +01:00
`emacs +{{line_number}} {{path/to/file}}`
2015-12-29 23:11:42 +00:00
2021-06-14 23:27:30 +01:00
- Start Emacs in console mode (without an X window):
2021-06-14 23:27:30 +01:00
`emacs --no-window-system`
2021-06-14 23:27:30 +01:00
- Start an Emacs server in the background (accessible via `emacsclient`):
2015-12-29 23:11:42 +00:00
2021-06-14 23:27:30 +01:00
`emacs --daemon`
2021-06-14 23:27:30 +01:00
- Stop a running Emacs server and all its instances, asking for confirmation on unsaved files:
2021-06-14 23:27:30 +01:00
`emacsclient --eval '(save-buffers-kill-emacs)'`
- Save a file in Emacs:
`Ctrl + X, Ctrl + S`
- Quit Emacs:
`Ctrl + X, Ctrl + C`