Emacs: Universal Argument (prefix arg)

By Xah Lee. Date: .

Emacs has a mechanism for a command to have variant behavior if user calls universal-argumentCtrl+u】 first, before calling the command.

The purpose of universal-argument is:

Keyboard shortcuts:

Examples

Type Ctrl+u 60 - to insert hyphen, 60 times.

In Emacs: File Manager, dired, type w (dired-copy-filename-as-kill) copies the file name, but type Ctrl+u 0 first, then w, the copied name is file full path.


Emacs Tutorial

Quick Start

Font

Split Window

File

Buffer

Copy/Paste

Find Replace

Unicode

Whitespace

Rectangle Edit

Line Wrap

Shell

View Special File

Editing Brackets

Org Mode

HTML

Emacs Efficiency

Misc