* Custom babel execute command with existing syntax highlighting
@ 2014-03-21 12:37 Andrey Tykhonov
2014-03-23 16:24 ` Eric Schulte
0 siblings, 1 reply; 2+ messages in thread
From: Andrey Tykhonov @ 2014-03-21 12:37 UTC (permalink / raw)
To: emacs-orgmode
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?
Andrey
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Custom babel execute command with existing syntax highlighting
2014-03-21 12:37 Custom babel execute command with existing syntax highlighting Andrey Tykhonov
@ 2014-03-23 16:24 ` Eric Schulte
0 siblings, 0 replies; 2+ messages in thread
From: Eric Schulte @ 2014-03-23 16:24 UTC (permalink / raw)
To: Andrey Tykhonov; +Cc: emacs-orgmode
Andrey Tykhonov <atykhonov@gmail.com> 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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-03-24 1:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-21 12:37 Custom babel execute command with existing syntax highlighting Andrey Tykhonov
2014-03-23 16:24 ` Eric Schulte
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.