Emanuel Berg via Users list for the GNU Emacs text editor
<help-gnu-emacs@gnu.org> writes:
A friend asked how to do this
Kate Moss
Elle Macpherson
Alicia Silverstone
into this
A Kate Moss
B Elle Macpherson
C Alicia Silverstone
No idea why!
Anyway, ABC index contest! Elisp and keyboard macros allowed!
Interactively, make a rectangle selection just before the first column
and then:
C-u C-x r N 65 RET %c RET
In Lisp, you could write something like
(defun rectangle-char-lines (beg end letter)
(interactive "r\ncStart letter:")
(rectangle-number-lines beg end letter "%c "))
and bind it to a key.