From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Schulte Subject: Re: Custom babel execute command with existing syntax highlighting Date: Sun, 23 Mar 2014 10:24:38 -0600 Message-ID: <871txsick5.fsf@gmail.com> References: <87pplf682z.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:47019) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WRuAW-0005eW-Ay for emacs-orgmode@gnu.org; Sun, 23 Mar 2014 21:59:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WRuAR-0003Bi-16 for emacs-orgmode@gnu.org; Sun, 23 Mar 2014 21:59:16 -0400 Received: from mail-ob0-x234.google.com ([2607:f8b0:4003:c01::234]:34385) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WRuAQ-0003BJ-T2 for emacs-orgmode@gnu.org; Sun, 23 Mar 2014 21:59:10 -0400 Received: by mail-ob0-f180.google.com with SMTP id wn1so5047309obc.39 for ; Sun, 23 Mar 2014 18:59:09 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Andrey Tykhonov Cc: emacs-orgmode@gnu.org Andrey Tykhonov 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