Usage notes

On this page, I document only the emacs commands that I use interactively.

Green means built-in, orange means custom.

Usage notes » Built-in

Usage notes » Built-in » Fundamental mode

Commands accessible from anywhere unless overridden.

⚠ Incomplete

Usage notes » Built-in » Fundamental mode » Routinely used commands

Some possibly less-well-known commands I routinely use are: M-m, C-x C-v, C-j.

Usage notes » Built-in » Fundamental mode » Routinely used commands » Moving within buffers

These commands move point (the cursor) and/or scroll to show a different portion of the buffer in the current window, but never modify the buffer.

isearch-forward, isearch-backward

C-s, C-r

My favorite way of moving around in emacs!

Allows you to move directly where you want to, with a minimum of thinking, keystrokes, and time.
Useful for all but the shortest distances.

Also, a staple of keyboard macros.

scroll-up, scroll-down

C-v, M-v (or PageDown, PageUp)

Scrolls down (respectively up). ("Scrolls the text up (respectively down)", hence the weird "reversed" nomenclature.)

Related .emacs sample: (setf next-screen-context-lines 1) (overrides default: 2.)

forward-char, backward-char, next-line, previous-line

C-f, C-b, C-n, C-p

Roughly, go one position forward, backward, down or up, respectively.

I never use the arrow keys in emacs.

I have (setf line-move-visual nil) in my .emacs, to move by logical lines.
The default, t, is perhaps initially appealing, but can really wreak havoc in keyboard macros in particular,
and anyway moving about in even extremely long lines is trivial with C-s and C-r.

Usage notes » Built-in » Fundamental mode » Routinely used commands » Managing buffers

Usage notes » Built-in » Fundamental mode » Routinely used commands » Managing windows

Usage notes » Built-in » Fundamental mode » Routinely used commands » Misc

kill-line

C-k

Kill from the current position to the end of the line.

yank

C-y

Paste the last block of consecutively killed text, or the last one that was yanked (pasted), whichever happened most recently.

Normally leaves point at the end of the yanked text, but with a prefix argument, leaves point at the start of the yanked text,
which is sometimes useful in keyboard macros in particular.

The mark is usefully left at the opposite end of the yanked text,
so you can immediately select the region of just-yanked text with C-x C-x if you need to operate on it.

yank-pop

M-y

Successive invocations of this command, which must happen after an initial C-y, cycle through the kill ring.

Usage notes » Built-in » Fundamental mode » Rarely used commands

Usage notes » Built-in » Fundamental mode » Almost never used commands

describe-mode

C-h m

Give an overview of how to use the current major mode.

indent-region

M-x indent-region

TODO

IS in fundamental mode, but the default keybinding is hard or impossible to type in my configuration.

untabify

M-x untabify

TODO

(Not actually in fundamental mode.)

Usage notes » Built-in » Dired

Filesystem browser and editor.

✔ Ready

Usage notes » Built-in » Dired » Routinely used commands

dired-find-file

RET

Visit the currently selected file or directory.

If it's a directory, open a new, independent instance of dired. The previous dired instance is left open in the background.
(Might be unintuitive to some, it certainly was to me at first...)

revert-buffer

g

Reload the directory from the filesystem, particularly to see changes made outside of emacs.

Usage notes » Built-in » Dired » Rarely used commands

dired-do-rename

R

Rename (and/or move) the currently selected file or directory.

Usage notes » Built-in » Dired » Almost never used commands

dired-up-directory

^

Open a new, independent instance of dired in the parent directory.

I often do C-x C-v and delete the last directory instead...

Usage notes » Built-in » Info

Documentation browser.

✔ Ready

Usage notes » Built-in » Info » Routinely used commands

For movement within an Info node, I simply use the normal emacs movement commands. I never ever use Info's utterly confusing SPC and DEL to scroll down and up, as they don't respect node boundaries and as a result don't make me feel in control.

Info-directory

d

Go to the topmost Info node, listing all Info manuals.

Info-up

u

Go up in the hierarchy of Info nodes.

Info-history-back

l

Go back to where you were before following the last link (menu item or cross-reference).

Especially useful after visiting a cross-reference to a tangential topic.

Info-exit

q

"Exit Info by selecting some other buffer."

Usage notes » Built-in » Info » Rarely used commands

Info-menu

m

Follow a link by (approximate) name in the current page's menu.

Honestly I usually just navigate to the link manually via other means and press RET...

But this is useful especially in the directory node to access a manual directly.
For example, d m Emacs RET, d m elisp RET, d m sed RET, etc.

Usage notes » Built-in » Info » Almost never used commands

Usage notes » Built-in » Lisp mode

A good base to build support for specific lisp dialects.

✘ Stub+

Usage notes » Built-in » Lisp mode » Routinely used commands

Usage notes » Built-in » Lisp mode » Rarely used commands

Usage notes » Built-in » Lisp mode » Almost never used commands

Usage notes » Extensions

Usage notes » Extensions » Slime

The most advanced open-source IDE for Common Lisp.

Usage notes » Extensions » Slime » Editor

Stub.

Usage notes » Extensions » Slime » REPL

Stub.

Usage notes » Extensions » Slime » Debugger

Stub.

Usage notes » Extensions » Slime » Inspector

Stub.

My config

Here's my .emacs file (see it on github). It's very raw and messy and undocumented, but it works for me...