Richard Sent <rich...@freakingpenguin.com> writes:

> * lisp/ox-texinfo.el (org-texinfo-src-block): Preserve the language
> field during export.

Ha!  I have the exact same patch in works.  I also asked on the Texinfo
Help mailing list [1] whether this will break compatibility with older
Texinfo versions (like @math did, where we had to add a special check).
The good news is, it will not.

> +The Texinfo exporter no longer removes the language from source blocks
> +during export.

I think it would be useful to mention "syntax highlighting", even link
the relevant Texinfo documentation, given that is the main motivation
behind the feature.

Nitpick: "no longer removes" could be positive, e.g. "now includes".

> +  (let* ((language (org-element-property :language src-block))
> +         (lisp (and language (string-match-p "lisp" language)))
> ...

Great work!  Would you be willing to also add some tests for this logic
(Lisp, non-Lisp, and no-language blocks), so we can freely refactor in
the future?

[1] https://lists.gnu.org/archive/html/help-texinfo/2025-03/msg00003.html

Rudy
-- 
"The whole science is nothing more than a refinement of everyday
thinking."  --- Albert Einstein, 1879-1955

Rudolf Adamkovič <rud...@adamkovic.org> [he/him]
http://adamkovic.org

Reply via email to