Malabarba / elisp-bug-hunter

Hunt down errors in elisp files.
275 stars 15 forks source link

Debugger entered--Lisp error: (invalid-read-syntax "#") #24

Open DamienCassou opened 6 years ago

DamienCassou commented 6 years ago

I tried to run bug-hunter on this assertion

(not (string= (format-spec "%s" '((?s . "foo"))) "foo"))

on my init.el and I got

Debugger entered--Lisp error: (invalid-read-syntax "#")
  (read #<buffer *Bug-Hunter Command*<2>>)
  (bug-hunter--run-form (condition-case [...]
  (bug-hunter--run-and-test ((setq package-enable-at-startup nil) [...]
  (bug-hunter-hunt (((setq package-enable-at-startup nil) [...]
  (bug-hunter-file "/home/cassou/.emacs.d/init.el" (not (string= (format-spec "%s" (quote ((115 . "foo")))) "foo")))
  (bug-hunter-init-file (not (string= (format-spec "%s" (quote ((115 . "foo")))) "foo"))) [...]
Malabarba commented 6 years ago

The bug-hunter can't catch invalid-syntax errors. Thas's because it starts operation by reading your entire init file into a list of expressions. So if there's some invalid syntax, the error happens at read-time, before the bug-hunter actually starts doing its thing. (it's technically possible to track-down read-time errors too, but it was never implemented).

stardiviner commented 6 years ago

@DamienCassou I meet this bug in comment-tags package when using package esup. You can try remove comment-tags. This might helpful. I found this out for a long time.