Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

quoted backslash in polymode chunks breaks font-locking #335

Open
maxecharel opened this issue May 28, 2024 · 0 comments
Open

quoted backslash in polymode chunks breaks font-locking #335

maxecharel opened this issue May 28, 2024 · 0 comments

Comments

@maxecharel
Copy link

Hi,

I am not sure whether this issue is restricted to poly-R and poly-markdown (more precisely, poly-gfm+r-mode), so I post it here.
Sorry for the possible mismatch.

Including escaping backslashes in strings in R blocks makes polymode font-locking break:
test_quoted_backslash_poly

The error message related to jit-lock is the following:

(jit-lock--run-functions 150 157) [span 150 157  test_quoted_backslash.Rmd] -> (font-lock-default-fontify-region 150 157): Wrong type argument: integer-or-marker-p, nil

This error is related to polymode fontification engine and does not appear when polymode is not installed. Here's the same example in markdown-mode (gfm-mode) without polymode but with markdown-fontify-code-blocks-natively set to t:
test_quoted_backslash_no_poly

As you can see, no font-locking problem here. Note that I set up a minimal environment to implement these tests, to control for/neutralize the possible effects of my config.

Relevant parts of the minimal environment used for testing:

  • GNU Emacs 29.3 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.33, cairo version 1.16.0)
    • natively compiled, but "ess" "poly-R" "polymode" "polynoweb" "poly-markdown" "poly-noweb" "eieio" excluded from native comp
  • ess 20240516.811 (Melpa)
  • poly-R 20230416.1454 (Melpa)
    • markdown-mode 20240501.1057 (dependency)
    • poly-markdown 20230202.1210 (dependency)
    • polymode 20230317.1218 (dependency)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant