From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ista Zahn Subject: Re: python sessions Date: Wed, 20 Mar 2013 15:42:19 -0400 Message-ID: References: <51496061.20706@easy-emacs.de> <20524.1363795610@alphaville> <5149ED11.6000502@easy-emacs.de> <21887.1363800343@alphaville> <22562.1363803338@alphaville> <514A0359.3010809@easy-emacs.de> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([208.118.235.92]:54047) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UIOuH-0004Yp-L8 for emacs-orgmode@gnu.org; Wed, 20 Mar 2013 15:42:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UIOuG-0000Qt-4e for emacs-orgmode@gnu.org; Wed, 20 Mar 2013 15:42:41 -0400 Received: from mail-da0-x236.google.com ([2607:f8b0:400e:c00::236]:56817) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UIOuF-0000Qo-U7 for emacs-orgmode@gnu.org; Wed, 20 Mar 2013 15:42:40 -0400 Received: by mail-da0-f54.google.com with SMTP id p1so1175092dad.27 for ; Wed, 20 Mar 2013 12:42:39 -0700 (PDT) In-Reply-To: <514A0359.3010809@easy-emacs.de> 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: =?UTF-8?Q?Andreas_R=C3=B6hler?= Cc: emacs-orgmode@gnu.org On Wed, Mar 20, 2013 at 2:43 PM, Andreas R=C3=B6hler wrote: > >> I guess it depends on the definition of "works". I don't get python >> buffers with the name of the :session variable. > > > Reads as it works only with named sessions, but fails with unnamed It fails to name the python process buffers. Everything else works as expected. Consider this example: 8<---------cut here------------8< #+BEGIN_SRC python :exports results :results output :session *foo* def foo(x): return(x+1) #+END_SRC #+RESULTS: #+BEGIN_SRC python :exports results :results output :session *bar* def bar(x): return(x+2) #+END_SRC #+RESULTS: #+BEGIN_SRC python :exports results :results output :session *foo* print(foo(100)) print(bar(100)) #+END_SRC #+RESULTS: : 101 : Traceback (most recent call last): : File "", line 1, in : NameError: name 'bar' is not defined #+BEGIN_SRC python :exports results :results output :session *bar* print(foo(100)) print(bar(100)) #+END_SRC #+RESULTS: : Traceback (most recent call last): : File "", line 1, in : NameError: name 'foo' is not defined : 102 8<---------cut here------------8< the foo function exists when I use :session foo (and not with :session bar), and the bar function exists when I uses :session bar (and not with :session foo). That equals "works" in my book. The only thing that doesn't "work" is that I have buffers . * tmp.org 1657 Org ~/Desktop/tmp.org * *Python*<2> 332 Inferior Python: * *Python* 332 Inferior Python: instead of . * tmp.org 1657 Org ~/Desktop/tmp.org * *foo* 332 Inferior Python: * *bar* 332 Inferior Python: This is with GNU Emacs 24.2.1 and Org-mode version 8.0-pre (release_8.0-pre-54-gb5a853 Best, Ista > > > But I do get separate >> >> python buffers (.e.g., *Python*, *Python*<2>) for each session, and >> python blocks get executed in the right python process. To me that >> equals "works", but if the issue is that the buffers don't get named >> with the value of :session then no, that doesn't work for me either. >> >> Best, >> Ista >> >>> >>> Nick >>> >>> >>> >> >> > >