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

> I added org-texinfo-listings-langs. I'm not super familiar with the Org
> codebase so I might've missed something, but as far as I can tell it's
> functionally correct.

In the case of `org-latex-listings-langs', the word "listings" refers to
the LaTeX package with the same name, Listings, which does syntax
highlighting.  There is also `org-latex-minted-langs' that works with
Minted, yet another popular choice.

Then, there is `org-latex-src-block-backend' that tells Org which
backend to use, such as Listings or none.

Does that make sense?

[I think your confusion stems from incorrect capitalization in the
respective docstrings, where both Listings and Minted are capitalized as
common and not proper nouns.  We should fix that!  Capitalization
matters.]

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?

Richard:

  Other than this problem, your patch looks great!

Rudy
-- 
"Genius is 1% inspiration and 99% perspiration."
--- Thomas Alva Edison, 1932

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

Reply via email to