From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?B?QW5kcmVhcyBSw7ZobGVy?= Subject: Re: python sessions Date: Mon, 25 Mar 2013 07:34:33 +0100 Message-ID: <514FEFF9.4060500@easy-emacs.de> References: <51496061.20706@easy-emacs.de> <514AB9FC.3050601@easy-emacs.de> <87d2ut2o5m.fsf@bzg.ath.cx> <514AC116.7030408@easy-emacs.de> <877gkxrbgn.fsf@gmail.com> <87fvzko0zv.fsf@gmail.com> <22817.1364179114@alphaville> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([208.118.235.92]:35771) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UK0yK-0006cP-Cs for emacs-orgmode@gnu.org; Mon, 25 Mar 2013 02:33:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UK0yI-0007yK-0Z for emacs-orgmode@gnu.org; Mon, 25 Mar 2013 02:33:32 -0400 Received: from moutng.kundenserver.de ([212.227.17.10]:59164) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UK0yH-0007xz-MV for emacs-orgmode@gnu.org; Mon, 25 Mar 2013 02:33:29 -0400 In-Reply-To: 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: emacs-orgmode@gnu.org Am 25.03.2013 03:59, schrieb John Hendy: > On Sun, Mar 24, 2013 at 9:38 PM, Nick Dokos wrote: >> Eric Schulte wrote: >> >>>> >>>> From participating in evaluating code throughout the discussion and >>>> catching the comments throughout, I'd say yes, at least in terms of >>>> how other babel languages function. In other words =#+begin_src R >>>> :session foo= creates an R session named "foo" whereas doing the same >>>> with =python= instead of =R= does not yield a named session. >>>> >>>> From what others experienced, however, the functionality was working >>>> correctly (results were persistent across blocks and two differently >>>> names blocks created two different sessions), just not named >>>> correctly. >>>> >>> >>> See the cond form starting at line 169 in ob-python.el. Different >>> session functionality is used based on the `org-babel-python-mode' >>> variable, and on the version of Emacs in use (prior to 24.1 or not). >>> >>> The branch taken when `org-babel-python-mode' equals 'python is >>> certainly broken, as it never saves the name of the newly created >>> buffer, so session re-use and use of multiple named sessions probably >>> works only when `org-babel-python-mode' equals 'python-mode. >>> >> >> That's me: org-babel-python-mode's value is python, so it's no wonder >> it's broken given what Eric says. I'm on emacs 24.3.50 where there is >> python.el but no python-mode.el. I tried the "cheap" workaround of >> switching the value to python-mode, but that does a (require >> 'python-mode) somewhere, so that option is out as well. > > I'm on Emacs 24.3.1 and have no python-mode.el, either (only > python.el). My setup is working correctly (again, with the caveat of > not having named sessions). > > > John > >> >> Thanks, >> Nick >> >> >> > > The python-mode(s) question should not be at stake, as in context it matters only for the choice, which command should start the Python shell - run-python or py-shell. All ob-python needs is a known buffer, commonly "*Python*", connected to a python-process. This seems done by both modes, so don't expect the bug here. Andreas