just-enough-emacs · 14m

Just enough Emacs

You need buffers, commands, variables, completion, and small Lisp expressions, not mastery of Emacs Lisp, to begin.

Frame contains windows; windows show buffers

Frame: the OS window
Window: a viewport
Buffer: inbox.org in org-mode
Window: minibuffer asking for a date

C-x 2 splits a window. It does not duplicate the file.

Emacs displays buffers, in-memory text objects often associated with files. A window is a viewport onto a buffer; a frame is an operating-system window containing one or more Emacs windows. A major mode supplies the main editing language: org-mode for .org files. Minor modes add optional behavior.

Commands are interactive functions. M-x org-agenda means press Alt/Meta+x, type the command, and press Enter. In key notation, C-c C-t means Control+c, release, then Control+t. A prefix argument modifies a command: C-u C-c C-t can request a different form of TODO selection.

The minibuffer at the bottom asks for filenames, dates, commands, and completion choices. Completion is built in; optional interfaces come much later.

Essential commands: C-x C-f open or create a file, C-x C-s save, C-x b switch buffer, C-/ undo, C-s search, M-x run a command, C-h k describe a key, C-h f describe a command, C-h v describe a variable, C-h m describe modes, C-g quit.

Configuration is Emacs Lisp evaluated during startup. Common locations are ~/.emacs, ~/.emacs.d/init.el, and ~/.config/emacs/init.el; use one primary init file. early-init.el runs before package and graphical initialization and is unnecessary for a beginner.

Start with this, and no more:

(setq org-directory (expand-file-name "~/org/"))
(setq org-agenda-files (list org-directory))

setq assigns variables. expand-file-name normalizes the directory. list constructs a one-item list because Agenda accepts multiple files or directories. Without these lines, Org still works; you simply choose files manually and Agenda has no declared collection.

Evaluate the expression before point with C-x C-e, a selected region with M-x eval-region, or reload the file with M-x load-file. A hook is a list of functions called at an event:

(add-hook 'org-mode-hook #'visual-line-mode)

The quoted symbol names the hook; #'visual-line-mode refers to the function. This wraps long prose visually without inserting hard line breaks.

Summary. You need buffers, commands, variables, completion, and small Lisp expressions, not mastery of Emacs Lisp, to begin. Emacs' self-documentation is the authoritative description of the version actually running.

Exercises

  • Basic: Open ~/org/inbox.org, save it, and inspect C-h m.
  • Practical: Use C-h k on C-c C-t inside an Org buffer.
  • Advanced: Evaluate the two-variable configuration temporarily and inspect each variable with C-h v.