Emacs: describe-char, Cursor Position

By Xah Lee. Date: . Last updated: .

What is describe-char

describe-char is a command that gives many info about the current character e.g. codepoint, name, plus cursor position, font used, etc.

Place cursor on the character then Alt+x describe-char.

Alt+x describe-char
Show info about the character under cursor.

The info includes:

  • Char's position in buffer.
  • Char's Codepoint (decimal, octal, hexadecimal)
  • Char Name
  • Encoding used for the character
  • Font used
  • Emacs syntax class of the character. [see Elisp: Syntax Table]

Show Cursor Position

emacs cursor position 2022-10-07 9FyNM
describe-char, showing cursor position. 2022-10-07

Find Character Codepoint, Character Name

emacs unicode codepoint 2022-10-07
describe-char, showing info about the right arrow → character. 2022-10-07

Get Codepoint of ASCII Control Character

emacs describe-char CR 2021-12-09
describe-char, showing ASCII control character CR.

Find Font Used for the Character Under Cursor

emacs describe-char 2021-09-25 TyYb
describe-char, showing current font used of a character.

Find Syntax Class of a Character

emacs describe char syntax class 2022-10-07
describe-char output, showing syntax table class. 2022-10-07

Check Character's Unicode Property

For example, check if a character is a unicode letter.

Place cursor on (or before) the char, then Alt+x describe-char , then read the line “general-category”. [see Emacs: Insert Unicode Character]

emacs describe-char 2022-02-19
emacs describe-char 2022-02-19

Jump to a Cursor Position

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

Emacs and Unicode

File Encoding

Unicode Font Setup

Emacs, font setup