help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ABC index


From: Dante Catalfamo
Subject: Re: ABC index
Date: Tue, 27 Oct 2020 23:08:55 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.3.1

If you wanted to make the starting letter more human readable, you could use ?A instead of 65 :-)

On 10/27/20 6:12 PM, Daniel Martín wrote:
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.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]