From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Schulte Subject: Re: python sessions Date: Sun, 24 Mar 2013 16:59:23 -0600 Message-ID: <87fvzko0zv.fsf@gmail.com> 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> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:58766) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UJtvk-0000s3-MA for emacs-orgmode@gnu.org; Sun, 24 Mar 2013 19:02:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UJtvj-0007Lw-9s for emacs-orgmode@gnu.org; Sun, 24 Mar 2013 19:02:24 -0400 Received: from mail-pa0-f52.google.com ([209.85.220.52]:40986) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UJtvj-0007Lp-4w for emacs-orgmode@gnu.org; Sun, 24 Mar 2013 19:02:23 -0400 Received: by mail-pa0-f52.google.com with SMTP id fb1so717052pad.39 for ; Sun, 24 Mar 2013 16:02:22 -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: John Hendy Cc: Bastien , emacs-orgmode > > 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. It looks to have been years since any serious changes were made to this portion of the code, so if the python-mode(s) have been changing in the background this sort of bit-rot is not unexpected. I never use python personally, so while I may be able to fix this at some point it certainly will not be in the near future (I need to focus on graduate school in the near term). It would be great if someone who uses Python code blocks could step forward to help with maintenance of ob-python.el. Sorry I can't be of more help. -- Eric Schulte http://cs.unm.edu/~eschulte