5

I'm using emacs 25.2 on osx 10.12 and following elisp intro to produce some error message intentionally.

(This is a list)

After I run C-x C-e on this line. A backtrace buffer appeared as supposed but with garbage error messages:

Debugger entered--Lisp error: (void-function This)
  (This is a list)
  eval((This is a list) nil)
  elisp--eval-last-sexp(nil)
  #[257 "\204�\303!\207 \303!\n)B\211A  =\204�\211A\211@\207" [eval-expression-debug-on-error elisp--eval-last-sexp-fake-value debug-on-error elisp--eval-last-sexp] 4 2273792 "P"](nil)
  ad-Advice-eval-last-sexp(#[257 "\204�\303!\207    \303!\n)B\211A  =\204�\211A\211@\207" [eval-expression-debug-on-error elisp--eval-last-sexp-fake-value debug-on-error elisp--eval-last-sexp] 4 2273792 "P"] nil)
  apply(ad-Advice-eval-last-sexp #[257 "\204�\303!\207  \303!\n)B\211A  =\204�\211A\211@\207" [eval-expression-debug-on-error elisp--eval-last-sexp-fake-value debug-on-error elisp--eval-last-sexp] 4 2273792 "P"] nil)
  eval-last-sexp(nil)
  funcall-interactively(eval-last-sexp nil)
  call-interactively(eval-last-sexp nil nil)
  command-execute(eval-last-sexp)

This seems like an encoding problem but I have no idea what to do with this. I'm more than happy to provide further information.

  • 2
    It's bytecode. There are emacs-devel@gnu.org discussions about this problem, as well as bug reports about it (eg 6991)and discussions of how to fix it. If you reevaluate the definition of a Lisp function and don't byte-compile it, you won't see its bytecode in the backtrace. – Drew Jun 24 '17 at 13:49
  • 1
    Interestingly, in the multiple discussions of this problem/annoyance, I don't recall anyone pointing out that it can also confuse users into thinking that perhaps they have a problem with character encoding and thus seeking a solution for that (non-problem). Yet another reason to fix this. – Drew Jun 24 '17 at 13:57
  • @Drew tks for your information. Guess you met a completely newbie here lol – spacegoing Jun 24 '17 at 15:44
3

Looks perfectly "normal" to me: the \NNN you see are bytes in the bytecode of the functions that have been used to run your code.

It's somewhat annoying to see them in the backtrace, indeed, so after a few decades of living with it, Emacs-26 finally changed to provide a prettier representation.

  • Can you provide more details about the change? I've considered adding an option to print it as "<bytecode>" instead, similar to what Xemacs does. – wasamasa Jun 24 '17 at 13:54
  • There's a new cl-print library in Emacs-26, which prints structs and bytecode functions in a more human-readable way. AFAICT it hasn't yet been hooked to the debug.el code (that handles the *Backtrace* debugger), but it's a very simple change. – Stefan Jun 24 '17 at 14:12
  • Apparently @npostavs expects to merge that code into the development version next week. Is it a coincidence that this question was posted here today, and this change was made just after that? Perhaps it was a timely reminder. Hooray for users! ;-) – Drew Jun 24 '17 at 23:17

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.