[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Custom babel execute command with existing syntax highlighting
From: |
Eric Schulte |
Subject: |
Re: [O] Custom babel execute command with existing syntax highlighting |
Date: |
Sun, 23 Mar 2014 10:24:38 -0600 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) |
Andrey Tykhonov <address@hidden> writes:
> Hi all!
>
> I have such block:
>
> #+BEGIN_SRC my-python
> import sys
> sys.platform
> #+END_SRC
>
> I want it to be with syntax highlighting, so it will looks like (in a
> org-file) exactly as:
>
> #+BEGIN_SRC python
> import sys
> sys.platform
> #+END_SRC
>
> (of course the value of org-src-fontify-natively is t).
>
> but in the same time I would like that that block will be executed by means
> of custom org-babel-execute:my-python command.
>
> How can I achieve that?
>
It sounds like you already know how to define a custom execution
function. To specify the mode used to highlight a code block, add an
element to the `org-src-lang-modes' variable. E.g.,
("my-python" . python)
Best,
>
>
>
> Andrey
>
--
Eric Schulte
https://cs.unm.edu/~eschulte
PGP: 0x614CA05D