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/emacs.md

38 lines
801 B
Markdown
Raw Normal View History

2015-12-30 14:14:38 +01:00
# emacs
> The extensible, customizable, self-documenting, real-time display editor.
2021-06-15 00:27:30 +02:00
> See also `emacsclient`.
2019-06-08 01:04:00 +01:00
> More information: <https://www.gnu.org/software/emacs>.
2015-12-30 14:14:38 +01:00
2021-06-15 00:27:30 +02:00
- Start Emacs and open a file:
2015-12-30 14:14:38 +01:00
2021-06-15 00:27:30 +02:00
`emacs {{path/to/file}}`
2015-12-29 18:11:42 -05:00
2021-06-15 00:27:30 +02:00
- Open a file at a specified line number:
2015-12-29 18:11:42 -05:00
2021-06-15 00:27:30 +02:00
`emacs +{{line_number}} {{path/to/file}}`
2015-12-29 18:11:42 -05:00
2022-09-01 22:22:16 -04:00
- Run an Emacs Lisp file as a script:
`emacs --script {{path/to/file.el}}`
2021-06-15 00:27:30 +02:00
- Start Emacs in console mode (without an X window):
2025-03-12 21:05:58 +02:00
`emacs {{[-nw|--no-window-system]}}`
2021-06-15 00:27:30 +02:00
- Start an Emacs server in the background (accessible via `emacsclient`):
2015-12-29 18:11:42 -05:00
2021-06-15 00:27:30 +02:00
`emacs --daemon`
2021-06-15 00:27:30 +02:00
- Stop a running Emacs server and all its instances, asking for confirmation on unsaved files:
2021-06-15 00:27:30 +02:00
`emacsclient --eval '(save-buffers-kill-emacs)'`
- Save a file in Emacs:
`<Ctrl x><Ctrl s>`
2021-06-15 00:27:30 +02:00
- Quit Emacs:
`<Ctrl x><Ctrl c>`