emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Robert Klein <roklein@roklein.de>
To: emacs-orgmode@gnu.org
Subject: Re: PATCH: programming language indicators in HTML export
Date: Mon, 14 Mar 2016 20:25:36 +0100	[thread overview]
Message-ID: <20160314202536.6548abed@lt70.fritz.box> (raw)
In-Reply-To: <87shztnj84.fsf@gmx.us>

Hi Rasmus,

Rasmus <rasmus@gmx.us> wrote:

> Hi Robert,
> 
> Thanks for the patch.
> 
> Robert Klein <roklein@roklein.de> writes:
> 
> > any thoughts about this?
> 
> Remind me, would this only show up when hovering above the block with
> the mouse when using this setup?

Yes.

> 
> The patch would make the default html header a bit longer, which may
> or may not be an issue.  Perhaps more importantly, it also does not
> deal with new languages.  Maybe it would be possible to add a bit of
> JS that would look up the language based on the class of the block in
> question?
> 
> E.g. the block
> 
>      #+BEGIN_SRC rsgrs
> 
>      #+END_SRC
> 
> would have class "src-rsgrs".

This happens already, but the JS would also have to create the
corresponding CSS code (that's what I hardcoded in the patch).

However you'd still need a mapping from src block identifier to
pleasantly readable text, e.g. js -> "Javascript", sql -> "SQL",
emacs-lisp -> "Emacs Lisp", ps -> "PostScript" etc.  When you have all
those it's not that much different from static CSS anymore...

There's no perfect solution, unfortunately, but src blocks have a lot
of limits for each language:
- is there an Emacs mode for editing?
- is there org-babel code for executing?
- is the language supported by the LaTeX listings package?
- or by the pygments library (for the LaTeX minted package)?


Anyway, my patch is basically for those who don't roll their own CSS to
have things mostly working out of the box. 


Best regards
Robert


> 
> Thanks,
> Rasmus
> 

  reply	other threads:[~2016-03-14 19:25 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-14 14:16 PATCH: programming language indicators in HTML export Robert Klein
2016-03-14 15:59 ` Rasmus
2016-03-14 19:25   ` Robert Klein [this message]
2016-03-15 14:24     ` Rasmus
2016-03-15 14:35       ` Robert Klein
2016-05-09 11:01 ` Robert Klein
2016-05-09 20:05   ` Nicolas Goaziou
2016-05-10  5:19     ` Robert Klein
2016-05-10  9:55       ` Rasmus
2016-05-10 19:07         ` Robert Klein
2016-05-10 20:22       ` Nicolas Goaziou

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160314202536.6548abed@lt70.fritz.box \
    --to=roklein@roklein.de \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).