Elisp Meta Characters in String— Kaushal Modi
The setup of outshine package for emacs requires the user to set the
"\M-#" before the
package (that ships with emacs) is loaded.
The best way to do this is via the Customize interface in emacs.
So I did
M-x customize and set that variable’s value to
"\M-#" and restarted
emacs and that worked.
But then I was surprised to see that value being saved in the
After some digging, I came across this elisp meta-character syntax reference,
In a string, the 2**7 bit attached to an ASCII character indicates a meta character; thus, the meta characters that can fit in a string have codes in the range from 128 to 255, and are the meta versions of the ordinary ASCII characters.
Thus if the decimal ASCII value of the
# character is 35, the decimal
\M-# will be “2**7 bit attached to #” i.e. 2**7 + 35 = 128 + 35 =
163. But the value of
\M-# got stored in
From the elisp general escape syntax reference,
An octal escape sequence consists of a backslash followed by up to three octal digits; thus, ‘?\101’ for the character A
.. and doing decimal to octal conversion of 163 gives 243!