0

If I go to the end of my .emacs file, and execute (point) with M-:, I get the following message:

37018 (#o110232, #x909a, ?邚)

Why does emacs feel the need to tell me what unicode character corresponds to the current position in the buffer?

The issue for me is that on OS X 10.9.3, emacs 24.3.92.1, point is sometimes very noticeably slow when I invoke it interactively, and I think it may be because it takes some time to look up the character, #x909a in this case. I am not sure how to debug this.

2
  • What output do you get from C-x = (what-cursor-position)? – choroba Jul 3 '14 at 5:43
  • @choroba At the end: point=36937 of 36936 (EOB) column=0; just before the end: Char: C-j (10, #o12, #xa) point=36936 of 36936 (100%) column=7 – Kirill Jul 3 '14 at 6:01
2

This is a feature :) Emacs Lisp doesn't have a separate type for characters (though XEmacs does), so characters are represented as integers. (point) returns an integer, so eval-expression cannot tell for sure whether you meant it as a number or as a character.

The formatting of the output is done in eval-expression-print-format in simple.el. Unfortunately, there doesn't seem to be any configuration option that could be used to turn this feature off.

The best workaround I can think of is to evaluate (format "%s" (point)) instead of just (point), or using C-x = instead.

1
  • Oh okay. Thank you for pointing me to eval-expression-print-format. – Kirill Jul 3 '14 at 10:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.