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

In Orgmode mismatching with => in SRC code segments #72

Closed
scofild429 opened this issue Nov 28, 2022 · 1 comment
Closed

In Orgmode mismatching with => in SRC code segments #72

scofild429 opened this issue Nov 28, 2022 · 1 comment

Comments

@scofild429
Copy link

In other major mode(js or ts), this is not the problem, but in src code segment, the mismatching occurs after the first =>
Screenshot from 2022-11-28 23-59-09

@Fanael
Copy link
Owner

Fanael commented Nov 29, 2022

This is a problem with org-mode setting syntactical properties of text incorrectly: since it doesn't require > or ( to be paired with its corresponding opening/closing character, it should not mark them as pairable delimiters in its syntax table, except maybe in contexts where they are paired, by marking those particular uses with appropriate text properties.

This doesn't only affect rainbow-delimiters, but also potentially any other package that relies on the Emacs syntax engine, depending on how tolerant of incorrect syntax it is.

To quote myself from #64 (comment):

Rainbow-delimiters is quite intentionally simply following what the Emacs syntax engine tells it — the same syntax engine that's used by {backward,forward}-sexp and show-paren-mode and everything that calls syntax-ppss and so on — both for simplicity reasons and consistency with the rest of the ecosystem. Changing that would require significant effort that's very similar to #1: not impossible, but very difficult to ensure correctness of, because there are approximately seventy five billion edge cases to consider.

@Fanael Fanael closed this as completed Nov 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants