Julien Palard

Python Developer and Trainer

Numeric arguments in emacs

I'm starting an 'emacs trick of the day' sequence with:

Receive a numeric argument that is given to the next called function, when no numeric argument is typed, the value defaults to 4. So today you can try:

You may ask, what about if I want to input 25 '6' ? C-u 256 can't work ... so you just have to separate with another C-u: C-u 25 C-u 1 gives 6666666666666666666666666.

Some functions does not have the simple 'repeating' effect of receiving a numeric parameter, for example, running C-u C-l does not recenter 4 times your screen! but the help page of recenter-top-bottom states that:

A prefix argument is handled like 'recenter': With numeric prefix ARG, move current line to window-line ARG. With plain C-u, move current line to window center. A negative argument to C-l move the current line to the line ARG from the bottom of the screen.