DarthFennec / highlight-indent-guides

Emacs minor mode to highlight indentation
572 stars 27 forks source link

highlight-indent-guides-mode-hook infinite recursively calling error #122

Open wenijinew opened 1 year ago

wenijinew commented 1 year ago

When I tried to load one theme, it got error below: Debugger entered--Lisp error: (error "Variable binding depth exceeds max-specpdl-size") tty-color-canonicalize("#ffffffffffff") tty-color-desc("#ffffffffffff" nil) tty-color-values("#ffffffffffff" nil) color-values("#ffffffffffff") color-name-to-rgb("#181522") color-lighten-name("#181522" 5) highlight-indent-guides-auto-set-faces() highlight-indent-guides-mode() run-hooks(highlight-indent-guides-mode-hook highlight-indent-guides-mode-on-hook) highlight-indent-guides-mode() run-hooks(highlight-indent-guides-mode-hook highlight-indent-guides-mode-on-hook) highlight-indent-guides-mode() run-hooks(highlight-indent-guides-mode-hook highlight-indent-guides-mode-on-hook) highlight-indent-guides-mode() run-hooks(highlight-indent-guides-mode-hook highlight-indent-guides-mode-on-hook) highlight-indent-guides-mode() run-hooks(highlight-indent-guides-mode-hook highlight-indent-guides-mode-on-hook) highlight-indent-guides-mode() See full stack here

bestlem commented 1 year ago

How did you set up the mode and what variables did you set or customize?

epwr commented 1 year ago

I believe I have run into the same issue (although a different error name), so possibly unrelated. The backtrace seems so related that it seems likely to be the same cause. Any suggestions would be wonderful!

I have a tried this with both a custom theme and the zenburn theme, so I do not believe it's caused by the theme.

My configuration of this package:

;; Set up highlighted indents
(use-package highlight-indent-guides
  :hook 'prog-mode 'highlight-indent-guides-mode
  :config
  (setq highlight-indent-guides-responsive 'top)
  (setq highlight-indent-guides-auto-enabled nil)
  )

Error backtrace:

Debugger entered--Lisp error: (error "Lisp nesting exceeds ‘max-lisp-eval-depth’")
  ad-substitute-tree(#f(compiled-function (form) #<bytecode -0x1f84e7fbb6a8f452>) #f(compiled-function (form) #<bytecode 0x1c940dd08ae6ec27>) (no-enable))
  ad-substitute-tree(#f(compiled-function (form) #<bytecode -0x1f84e7fbb6a8f452>) #f(compiled-function (form) #<bytecode 0x1c940dd08ae6ec27>) (no-confirm no-enable))
  ad-substitute-tree(#f(compiled-function (form) #<bytecode -0x1f84e7fbb6a8f452>) #f(compiled-function (form) #<bytecode 0x1c940dd08ae6ec27>) (theme no-confirm no-enable))
  ad-substitute-tree(#f(compiled-function (form) #<bytecode -0x1f84e7fbb6a8f452>) #f(compiled-function (form) #<bytecode 0x1c940dd08ae6ec27>) (ad--addoit-function theme no-confirm no-enable))
  ad-substitute-tree(#f(compiled-function (form) #<bytecode -0x1f84e7fbb6a8f452>) #f(compiled-function (form) #<bytecode 0x1c940dd08ae6ec27>) (funcall ad--addoit-function theme no-confirm no-enable))
  ad-substitute-tree(#f(compiled-function (form) #<bytecode -0x1f84e7fbb6a8f452>) #f(compiled-function (form) #<bytecode 0x1c940dd08ae6ec27>) ((funcall ad--addoit-function theme no-confirm no-enable)))
  ad-substitute-tree(#f(compiled-function (form) #<bytecode -0x1f84e7fbb6a8f452>) #f(compiled-function (form) #<bytecode 0x1c940dd08ae6ec27>) (with-no-warnings (funcall ad--addoit-function theme no-confirm no-enable)))
  ad-substitute-tree(#f(compiled-function (form) #<bytecode -0x1f84e7fbb6a8f452>) #f(compiled-function (form) #<bytecode 0x1c940dd08ae6ec27>) ((with-no-warnings (funcall ad--addoit-function theme no-confirm no-enable))))
  ad-substitute-tree(#f(compiled-function (form) #<bytecode -0x1f84e7fbb6a8f452>) #f(compiled-function (form) #<bytecode 0x1c940dd08ae6ec27>) (ad-return-value (with-no-warnings (funcall ad--addoit-function theme no-confirm no-enable))))
  ad-substitute-tree(#f(compiled-function (form) #<bytecode -0x1f84e7fbb6a8f452>) #f(compiled-function (form) #<bytecode 0x1c940dd08ae6ec27>) (setq ad-return-value (with-no-warnings (funcall ad--addoit-function theme no-confirm no-enable))))
  ad-substitute-tree(#f(compiled-function (form) #<bytecode -0x1f84e7fbb6a8f452>) #f(compiled-function (form) #<bytecode 0x1c940dd08ae6ec27>) ((setq ad-return-value (with-no-warnings (funcall ad--addoit-function theme no-confirm no-enable))) (highlight-indent-guides-auto-set-faces) ad-return-value))
  ad-substitute-tree(#f(compiled-function (form) #<bytecode -0x1f84e7fbb6a8f452>) #f(compiled-function (form) #<bytecode 0x1c940dd08ae6ec27>) ((ad-return-value) (setq ad-return-value (with-no-warnings (funcall ad--addoit-function theme no-confirm no-enable))) (highlight-indent-guides-auto-set-faces) ad-return-value))
  ad-substitute-tree(#f(compiled-function (form) #<bytecode -0x1f84e7fbb6a8f452>) #f(compiled-function (form) #<bytecode 0x1c940dd08ae6ec27>) (let (ad-return-value) (setq ad-return-value (with-no-warnings (funcall ad--addoit-function theme no-confirm no-enable))) (highlight-indent-guides-auto-set-faces) ad-return-value))
  ad-substitute-tree(#f(compiled-function (form) #<bytecode -0x1f84e7fbb6a8f452>) #f(compiled-function (form) #<bytecode 0x1c940dd08ae6ec27>) ((let (ad-return-value) (setq ad-return-value (with-no-warnings (funcall ad--addoit-function theme no-confirm no-enable))) (highlight-indent-guides-auto-set-faces) ad-return-value)))
  ad-substitute-tree(#f(compiled-function (form) #<bytecode -0x1f84e7fbb6a8f452>) #f(compiled-function (form) #<bytecode 0x1c940dd08ae6ec27>) ((ad--addoit-function theme &optional no-confirm no-enable) (let (ad-return-value) (setq ad-return-value (with-no-warnings (funcall ad--addoit-function theme no-confirm no-enable))) (highlight-indent-guides-auto-set-faces) ad-return-value)))
  ad-substitute-tree(#f(compiled-function (form) #<bytecode -0x1f84e7fbb6a8f452>) #f(compiled-function (form) #<bytecode 0x1c940dd08ae6ec27>) (lambda (ad--addoit-function theme &optional no-confirm no-enable) (let (ad-return-value) (setq ad-return-value (with-no-warnings (funcall ad--addoit-function theme no-confirm no-enable))) (highlight-indent-guides-auto-set-faces) ad-return-value)))
  ad-insert-argument-access-forms((lambda (ad--addoit-function theme &optional no-confirm no-enable) (let (ad-return-value) (setq ad-return-value (with-no-warnings (funcall ad--addoit-function theme no-confirm no-enable))) (highlight-indent-guides-auto-set-faces) ad-return-value)) (theme &optional no-confirm no-enable))
  ad-assemble-advised-definition((theme &optional no-confirm no-enable) nil nil (funcall ad--addoit-function theme no-confirm no-enable) nil nil ((highlight-indent-guides-auto-set-faces nil t (advice lambda nil "Automatically calculate indent guide faces.\nIf thi..." (highlight-indent-guides-auto-set-faces)))))
  ad-make-advised-definition(load-theme)
  ad-activate-advised-definition(load-theme nil)
  ad-activate(load-theme)
  highlight-indent-guides-mode()
  run-hooks(highlight-indent-guides-mode-hook highlight-indent-guides-mode-on-hook)
  highlight-indent-guides-mode()
  run-hooks(highlight-indent-guides-mode-hook highlight-indent-guides-mode-on-hook)
  ...
  run-hooks(highlight-indent-guides-mode-hook highlight-indent-guides-mode-on-hook)
  highlight-indent-guides-mode()
  run-hooks(change-major-mode-after-body-hook prog-mode-hook lisp-data-mode-hook emacs-lisp-mode-hook lisp-interaction-mode-hook)
  apply(run-hooks (change-major-mode-after-body-hook prog-mode-hook lisp-data-mode-hook emacs-lisp-mode-hook lisp-interaction-mode-hook))
  run-mode-hooks(lisp-interaction-mode-hook)
  lisp-interaction-mode()
  command-line()
  normal-top-level()