minad / marginalia

:scroll: marginalia.el - Marginalia in the minibuffer
GNU General Public License v3.0
780 stars 27 forks source link

Error during redisplay: args out of range #173

Closed meedstrom closed 7 months ago

meedstrom commented 7 months ago

This is an intermittent problem, not sure when it starts appearing. Now that it appeared, I'm getting a lot of redisplay errors when I start a completing-read (some commands more than others --- M-x emits no errors, and consult-buffer actually freezes emacs until I do a few C-g!).

I have backtrace-on-redisplay-error t, so here's a backtrace. The specific args vary, but so far I've seen it's about truncate-string-to-width.

If I turn off marginalia-mode, the problem goes away. Just to be sure it isn't something else :)

Error: args-out-of-range ("Print DOM at point as HTML/XML." 31)
  mapbacktrace(#f(compiled-function (evald func args flags) #<bytecode -0x108e998125171d7>))
  debug-early-backtrace()
  debug-early(error (args-out-of-range "Print DOM at point as HTML/XML." 31))
  truncate-string-to-width("Print DOM at point as HTML/XML." 80 0 32 "…")
  marginalia--truncate("Print DOM at point as HTML/XML.\nIf PRETTY, indent the HTML/XML logically.\nIf XML, generate XML instead of HTML.\n\n(fn DOM &optional PRETTY XML)" 1.0)
  marginalia-annotate-function("dom-print")
  marginalia--cached((("mapconcat" "mapcan" "-mapcat" "cl-intersection" "json-encode" "f-write" "org-on-heading-p" "org-previous-visible-heading" "org-at-heading-p" "with-file!" "org-roam-with-file" "org-id-get" "my-org-add-:CREATED:" "org-next-visible-heading" "forward-line" "truncate-string-to-width") . #<hash-table equal 16/100 0x18ae70924185>) marginalia-annotate-function "dom-print")
  marginalia--affixate((metadata (category . symbol-help)) marginalia-annotate-function ("truncate-string-to-width" "forward-line" "org-next-visible-heading" "my-org-add-:CREATED:" "org-id-get" "org-roam-with-file" "with-file!" "org-at-heading-p" "org-previous-visible-heading" "org-on-heading-p" "f-write" "json-encode" "cl-intersection" "-mapcat" "mapcan" "mapconcat" "dom-print"))
  apply(marginalia--affixate ((metadata (category . symbol-help)) marginalia-annotate-function ("truncate-string-to-width" "forward-line" "org-next-visible-heading" "my-org-add-:CREATED:" "org-id-get" "org-roam-with-file" "with-file!" "org-at-heading-p" "org-previous-visible-heading" "org-on-heading-p" "f-write" "json-encode" "cl-intersection" "-mapcat" "mapcan" "mapconcat" "dom-print")))
  #f(compiled-function (&rest args2) #<bytecode -0xae2a53f6cf8a63f>)(("truncate-string-to-width" "forward-line" "org-next-visible-heading" "my-org-add-:CREATED:" "org-id-get" "org-roam-with-file" "with-file!" "org-at-heading-p" "org-previous-visible-heading" "org-on-heading-p" "f-write" "json-encode" "cl-intersection" "-mapcat" "mapcan" "mapconcat" "dom-print"))
  #f(compiled-function (cands) #<bytecode 0xda3e27de58a8f8a>)(("truncate-string-to-width" "forward-line" "org-next-visible-heading" "my-org-add-:CREATED:" "org-id-get" "org-roam-with-file" "with-file!" "org-at-heading-p" "org-previous-visible-heading" "org-on-heading-p" "f-write" "json-encode" "cl-intersection" "-mapcat" "mapcan" "mapconcat" "dom-print"))
  vertico--affixate(("truncate-string-to-width" "forward-line" "org-next-visible-heading" "my-org-add-:CREATED:" "org-id-get" "org-roam-with-file" "with-file!" "org-at-heading-p" "org-previous-visible-heading" "org-on-heading-p" "f-write" "json-encode" "cl-intersection" "-mapcat" "mapcan" "mapconcat" "dom-print"))
  vertico--arrange-candidates()
  vertico--exhibit()
  #<subr completing-read-default>("Describe function (default truncate-string-to-width): " help--symbol-completion-table #f(compiled-function (f) #<bytecode 0x17c923a29cc477fa>) confirm nil nil "truncate-string-to-width" nil)
  apply((#<subr completing-read-default> "Describe function (default truncate-string-to-width): " help--symbol-completion-table #f(compiled-function (f) #<bytecode 0x17c923a29cc477fa>) confirm nil nil "truncate-string-to-width" nil))
  #f(compiled-function (&rest app) #<bytecode -0x1fdc7757c1201067>)(#<subr completing-read-default> "Describe function (default truncate-string-to-width): " help--symbol-completion-table #f(compiled-function (f) #<bytecode 0x17c923a29cc477fa>) confirm nil nil "truncate-string-to-width" nil)
  apply(#f(compiled-function (&rest app) #<bytecode -0x1fdc7757c1201067>) (#<subr completing-read-default> "Describe function (default truncate-string-to-width): " help--symbol-completion-table #f(compiled-function (f) #<bytecode 0x17c923a29cc477fa>) confirm nil nil "truncate-string-to-width" nil))
  vertico--advice(#<subr completing-read-default> "Describe function (default truncate-string-to-width): " help--symbol-completion-table #f(compiled-function (f) #<bytecode 0x17c923a29cc477fa>) confirm nil nil "truncate-string-to-width" nil)
  apply(vertico--advice #<subr completing-read-default> ("Describe function (default truncate-string-to-width): " help--symbol-completion-table #f(compiled-function (f) #<bytecode 0x17c923a29cc477fa>) confirm nil nil "truncate-string-to-width" nil))
  completing-read-default("Describe function (default truncate-string-to-width): " help--symbol-completion-table #f(compiled-function (f) #<bytecode 0x17c923a29cc477fa>) confirm nil nil "truncate-string-to-width" nil)
  help-fns--describe-function-or-command-prompt()
  command-execute(describe-function)