How to select or highlight a block in Emacs?

If I understand the question correctly, it is not about rectangular regions originally.

C-Spc puts a mark at the current position.

Wherever your cursor is afterwards, the text between the last mark and the current position is "selected" (you can highlight this by activating transient-mark-mode, but this will also mean that marks have to be deleted when you don't want highlight).

You can operate on that region with commands like:

C-w . . Kill region. This deletes and puts the region into the kill ring.
C-y . . Yank. This inserts the last snippet from the kill ring.
M-y . . Cycle kill ring. Immediately after C-y, this replaces the yanked part by the other snippets in the kill ring.
M-w . . Save region into kill ring. Like C-w, but doesn't delete.

This is just the basic usage. Marks have other uses, too. I recommend the tutorial (C-h t).


Take a look at region-rectangle in emacs.

In short, you start selection like usual with Control-Space, then kill region with Control-x r k and paste (or yank) killed block with Control-x r y.


Emacs 24.4 now has rectangle-mark-mode. C-x space to invoke it.