[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] PATCH: programming language indicators in HTML export
From: |
Robert Klein |
Subject: |
Re: [O] PATCH: programming language indicators in HTML export |
Date: |
Tue, 10 May 2016 21:07:04 +0200 |
Hi,
Rasmus <address@hidden> wrote:
> Robert Klein <address@hidden> writes:
>
> > Hi,
> >
> > Nicolas Goaziou <address@hidden> wrote:
> >
> >> Hello,
> >>
> >> Robert Klein <address@hidden> writes:
> >>
> >> > anyone willing to commit this patch I sent back in march?
> >>
> >> This patch actually felt through the cracks. Sorry about that.
> >> Would you mind sending it again, using git format-patch so I can
> >> apply it?
> >>
> >
> > Please find the patch attached.
>
> I wonder if it would be possible (or even desirable) to build this
> part of the css header automatically? It may be too prone to
> unexpected bugs.
>
basically same answer I gave last time; when you want JS to create the
CSS you still have to map the source block identifier to ``readable''
text elsewhere. You'd just move the static from org-modes basic CSS
into org-mode.
I think the patch is a bonus for those, that don't roll their own CSS
(e.g. Tianxian Xiong, who first gave me the idea).
Any automated solution would be error-prone, too, and depend on:
- what's the Emacs mode for editing (or is there one at all)?
- is there an ob-<language> module for running the code?
- for LaTeX export: is the language supported by
- the LaTeX listings package (and what is its name there?)?
- or the pygments library (for those using the LaTeX minted package)?
One example I use for documentation is `conf' source blocks for
`generic' configuration files. For LaTeX export I have to add
(add-to-list 'org-latex-listings-langs '(conf " "))
to my .emacs, as the listings package doesn't support a `configuration'
language.
It's a hack, but it works. I don't see a general solution (even if
restricted to the CSS header).
I see my patch as a `best effort' for getting things working out of the
box. Anyone rolling his own CSS will probably pick his 2 to 5
languages and be happy with them.
Best regards
Robert