From: Torsten Wagner <torsten.wagner@gmail.com>
To: Arne Babenhauserheide <arne_bab@web.de>
Cc: emacs-orgmode@gnu.org
Subject: Re: Wish: babel for python3
Date: Tue, 18 Oct 2011 17:56:25 +0900 [thread overview]
Message-ID: <4E9D3F39.6020703@gmail.com> (raw)
In-Reply-To: <3500778.0hWYKf89pM@fluss>
Hi,
(sorry Arne for the eventual double post, I forogot to attt the mailing
list)
>>>> Is there a way to get python3 support for Babel into org-mode
>>>> cleanly?
>> Something like:
>> -*- org-babel-python-command: "python3"
alternatively (a trick Eric is never tired to mention to me ) you could
add a little lisp block which change all kind of language related
aspects for you. This could include many more options and modify your
emacs environment just to your personal needs for a certain language.
Make one for python2 and one for python3 and execute them dependent on
which system you are going to use.
Without testing and without guarantee it should be something like the
below code. To demonstrate some more functionality lets change the
modebar background colour to make it more visible which python mode you
are currently using.
#+srcname: python2_env
#+begin_src emacs-lisp
(setq org-babel-python-command "python")
(set-face-background 'modeline "#4477aa")
#+end_src
#+srcname: python3_env
#+begin_src emacs-lisp
(setq org-babel-python-command "python3")
(set-face-background 'modeline "#771944")
#+end_src
Sure both could be done with file bounded variables too. But know you
can switch between both environments within the same buffer, e.g., to
check if the code runs on both python versions
Regards
Totti
next prev parent reply other threads:[~2011-10-18 8:56 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-14 14:42 Wish: babel for python3 Arne Babenhauserheide
2011-10-15 18:36 ` Eric Schulte
2011-10-15 18:52 ` Arne Babenhauserheide
2011-10-15 20:09 ` Thomas S. Dye
2011-10-15 20:29 ` Arne Babenhauserheide
2011-10-18 8:56 ` Torsten Wagner [this message]
2011-10-18 12:13 ` Rasmus
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4E9D3F39.6020703@gmail.com \
--to=torsten.wagner@gmail.com \
--cc=arne_bab@web.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 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.