Skip to content

Splicing in overlays breaks for literate-calc-mode #35

Description

@sulami

This was noticed by a user (sulami/literate-calc-mode.el#17).

I have not done any extensive research, but I can provide a traceback & a minimal example.

#+begin_src literate-calc
Pi = 3.14159
#+end_src
Debugger entered--Lisp error: (args-out-of-range "Pi " 0 12)
  substring("Pi " 0 12)
  htmlize-add-before-after-strings(1 4 "Pi ")
  htmlize-get-text-with-display(1 4)
  htmlize-buffer-substring-no-invisible(1 4)
  htmlize-extract-text(1 4 nil)
  htmlize-buffer-1()
  htmlize-region(1 13)
  org-html-htmlize-region-for-paste(1 13)
  org-html-fontify-code("Pi = 3.14159" "literate-calc")
  org-html-do-format-code("Pi = 3.14159" "literate-calc" nil t nil nil)
  [ more frames omitted ]

This is where the traceback leads me.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions