all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Myles English <mylesenglish@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: wrong python version with :session
Date: Tue, 06 Sep 2011 20:42:00 +0100	[thread overview]
Message-ID: <87mxehwj93.fsf@bill.i-did-not-set--mail-host-address--so-tickle-me> (raw)
In-Reply-To: <87sjobvv1u.fsf@bill.home> (Myles English's message of "Mon, 05 Sep 2011 17:00:13 +0100")


Just ignore this thread, the issue was dealt with in an identical one,
also started by me!

>> On Mon, 05 Sep 2011 17:00:13 +0100, Myles English said:

  > Hello, When a python source block has a :session header argument,
  > the python version selected does not appear to respect the value of
  > the variable org-babel-python-command.

  > In my .emacs:

  > (require 'org-install)

  > (org-babel-do-load-languages 'org-babel-load-languages '((python
  > . t) ))

  > (setq org-babel-python-command "python2")

  > In my org file:

  > #+begin_src python :results output import sys print(sys.version)
  > #+end_src

  > #+results: : 2.7.2 (default, Jun 29 2011, 11:10:00) : [GCC 4.6.1]

  > Now exactly the same but with ":session x" header argument:

  > #+begin_src python :results output :session x import sys
  > print(sys.version) #+end_src

  > #+results: : : 3.2.1 (default, Jul 11 2011, 12:37:47) : [GCC 4.6.1]

  > So babel has chosen to use Python 3.2 When I wanted to use Python
  > 2.7, as in the first block, and the value of
  > org-babel-python-command is still "python2".

  > Versions:

  > orgmode commit cae9f947be (Aug 30th) GNU Emacs 23.3.1
  > (x86_64-unknown-linux-gnu, GTK+ Version 2.22.1) of 2011-03-10 on
  > bitzer.hoetzel.info

  > $ ls -l `which python{2,3,}` /usr/bin/python -> python3
  > /usr/bin/python2 -> python2.7 /usr/bin/python3

  > Am I doing something wrong or is this a bug?

  > Thanks,

  > Myles

  > -- The University of Edinburgh is a charitable body, registered in
  > Scotland, with registration number SC005336.

      reply	other threads:[~2011-09-06 19:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-05 16:00 wrong python version with :session Myles English
2011-09-06 19:42 ` Myles English [this message]

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=87mxehwj93.fsf@bill.i-did-not-set--mail-host-address--so-tickle-me \
    --to=mylesenglish@gmail.com \
    --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.