Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Emacs: what is this info returned after a variable's value?

Tags:

emacs

elisp

I use eval-expression (M-:) to get some variable's value in the message buffer.

I used it today to evaluate the variable left-margin and got the following value:

0 (#o0, #x0)

0 is the actual value, but I'm oblivious to what the other symbols mean.

If I evaluate the following with eval-last-sexp (C-x C-e) I just get the value alone:

(identity left-margin)
-> 0

Can someone shed some light on what those symbols mean and why they appear only with eval-expression? Thanks.

like image 330
fullmontis Avatar asked Sep 07 '14 12:09

fullmontis


1 Answers

It is the octal and hexadecimal representation of 0. The prefix #o means "octal representation follows" and #x means "hexadecimal representation follows".

To verify, do set-variable to e.g 10 first and then you'll get:

10 (#o12, #xa)

a is 10 in hex, and 12 is 10 in octal form.

like image 145
Enselic Avatar answered Oct 17 '22 16:10

Enselic