Emacs: Show Cursor Position

By Xah Lee. Date: . Last updated: .

Show Cursor Column Number

emacs column number mode 56206
emacs column-number-mode
Alt+x column-number-mode
Show line number and cursor column position in mode line (aka status bar), like this: (166,3). The first is line number, the second is position from the beginning of line.

To always have it on, put the following code in your emacs init file.

;; show cursor position within line
(column-number-mode 1)

Show Ruler

Alt+x ruler-mode
Display a ruler at top of current window.
emacs ruler mode 2016 12 31
Emacs Alt+x ruler-mode

Cursor Position in Buffer

Alt+x describe-char
Show the current cursor position.

In a buffer, the left of first character has position 0.

emacs describe char 2018 03 01 93728
emacs Alt+x describe-char

Jump to a Cursor Position

Alt+x goto-char
Move cursor to a given position.

Emacs Show Line/Column Number

If you have a question, put $5 at patreon and message me on xah discord.
Or support me by Buy Xah Emacs Tutorial

Emacs Tutorial

Emacs Init

Emacs Keys


ELisp Examples

ELisp Write Major Mode

Emacs Init

Init Basics


text editing