Rudolf Adamkovič <rud...@adamkovic.org> writes:

> Here are some things we could do...
>
> OPTION 1: Keep it simple, if a bit messy:
>
>   Rename `org-texinfo-listings-langs' to `org-texinfo-langs', and make
>   sure all languages Org supports OOTB map correctly to Highlight,
>   Pygments, and GNU Source Highlight.  Perhaps add a comment to each, so
>   that it is clear what is what.  YOLO. :)
>
> OPTION 2: Mirror `org-latex':
>
>   Mirror:
>   
>     - `org-latex-src-block-backend'
>     - `org-latex-*-langs'
>
>   with three customizations:
>
>     - `org-texinfo-highlight-langs'
>     - `org-texinfo-pygments-langs'
>     - `org-texinfo-source-highlight-langs' [*]
>   
>   each with the correct values for the given backend, and
>   
>     - org-texinfo-src-block-backend
>
>   customization that decides what to use for highlighting, if anything.
>
>   [*] or `...-gnu-source-highlight-...` ???
>
> Ihor:
>
>   You have the most Org-wide wisdom: What do you think about the above?

If we want to introduce `org-texinfo-src-block-backend', we should then
also support setting the backend for texinfo when exporting to .info
format. That's more than what the existing patch offers.

Also, keep in mind that syntax highlighting is experimental and that the
texinfo manual explicitly says

     Warning: Source highlighting is experimental; feedback is
     welcomed. The syntax of HIGHLIGHT_SYNTAX is very likely to change
     in future release.

In other words, specifics of setting "backend" may change in the future.
I am not sure if it is yet the time to support such unstable features.
I encourage you to dig a bit more into the topic and see how texinfo
project views this feature.

On the other hand, simply allowing to specify @example appears to be
safe (I may be wrong), even if we happen to use language name that is
not supported by the highlighter.

Maybe we can move cautiously and simply refrain from overengineering the
area until the dust settles on texinfo side. Maybe not, if they are
serious about the feature specs.

-- 
Ihor Radchenko // yantar92,
Org mode maintainer,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>

Reply via email to