I generated a macro as a help for generating indices for words I have marked before. Now this macro looks as follows
(fset 'index
"\367\\index{\C-y")
What does \367
stand for and where can I look it up?
Emacs Stack Exchange is a question and answer site for those using, extending or developing Emacs. It only takes a minute to sign up.
Sign up to join this communityI generated a macro as a help for generating indices for words I have marked before. Now this macro looks as follows
(fset 'index
"\367\\index{\C-y")
What does \367
stand for and where can I look it up?
This is a representation of the character whose code is 367 in octal. This "general escape representation" is described in the elisp manual.
You can use the function text-char-description
as:
M-: (text-char-description ?\367)
or M-x describe-char
with point on the char
to see this is the character DIVISION SIGN.
Now the question is what does it stand for?
The short answer is that this character is the representation of the keyboard event M-w
in a string. For the details I recommend reading section Putting Keyboard Events in Strings of the elisp manual.
Also note that the manual discourages storing keyboard events in strings and recommends using vectors instead.
insert-kbd-macro
does not bring up a string for me. I'm currently investigating.
Aug 23, 2019 at 9:34
insert-kbd-macro
does not bring up a string for me" - it depends which keys you have in the macro: if all of them are plain characters that fit in range 0-255, then Emacs will use a string, otherwise a vector.