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

Org-mode src block fixes #452

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Org-mode src block fixes #452

wants to merge 2 commits into from

Conversation

gudzpoz
Copy link

@gudzpoz gudzpoz commented Jan 16, 2025

This PR contains two simple fixes for the org-mode plugin:

  1. Use pygments' Emacs Lisp highlighting instead of Scheme highlighting for ELisp, since pygments has supported it for years (https://github.com/pygments/pygments/blame/edef94d66c2d70f05a86ac6098a69ab253b8d946/pygments/lexers/lisp.py#L1668).
  2. Use org-export-unravel-code to extract code from org-mode source blocks to correctly handle "any reference, protective commas and spurious indentation". (The code now uses define-advice to reuse the original org-html-src-block as much as possible.)

(Also, there are some indentation adjustments when I re-format the code with vanilla Emacs.)

@gudzpoz
Copy link
Author

gudzpoz commented Jan 16, 2025

I added a few more changes to:

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

Successfully merging this pull request may close these issues.

1 participant