From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ken Mankoff Subject: Re: python :session does return Date: Wed, 15 Jan 2014 07:22:59 -0500 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a11c309469ac98d04f0015ee6 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:51542) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W3PV1-0003xk-9P for emacs-orgmode@gnu.org; Wed, 15 Jan 2014 07:23:23 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W3PUq-0003ze-Lt for emacs-orgmode@gnu.org; Wed, 15 Jan 2014 07:23:11 -0500 Received: from mail-oa0-x22c.google.com ([2607:f8b0:4003:c02::22c]:63081) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W3PUq-0003zR-Eb for emacs-orgmode@gnu.org; Wed, 15 Jan 2014 07:23:00 -0500 Received: by mail-oa0-f44.google.com with SMTP id g12so1097081oah.31 for ; Wed, 15 Jan 2014 04:22:59 -0800 (PST) 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: John Hendy Cc: Org-mode --001a11c309469ac98d04f0015ee6 Content-Type: text/plain; charset=ISO-8859-1 Hi John, Yes, you and others in that thread seem to be experiencing the same problem, although there are also different issues discussed there. I'm a bit surprised... With the popularity of python I would expect more org users to have run into this and it to be fixed, but perhaps it isn't as widely used as I thought. Anyway, it is now usable even if the 'print' statements don't show up. -k. On Tue, Jan 14, 2014 at 6:04 PM, John Hendy wrote: > On Tue, Jan 14, 2014 at 7:38 AM, Ken Mankoff wrote: > > > > I've seen various historical issues with :session but it seems I may > have a > > different problem. This is the latest org in emacs 24.3. If I do not have > > :session, then everything works just fine. > > > > This sounded familiar to me, so I googled around for Org mailing list > discussions I was involved in related to python. Does this shed any > new light? > - https://www.mail-archive.com/emacs-orgmode@gnu.org/msg68542.html > > Seems that the discussion ended with the possibility that it was an > emacs change to python.el, and not related to Org, but I'm not sure if > any actions were ever taken regarding that. In any case, the > discussion features a discrepancy between python behavior with > `:session name` and without, so it seemed like a possible candidate to > pass along! > > > > Best regards, > John > > > If I C-c C-c in the following code: > > > > #+BEGIN_SRC python :session transect > > import numpy as np > > x = np.arange(12) > > #+END_SRC > > > > Emacs hangs the first time with minibuffer message of "Sent > > python-eldoc-setup-code". If I C-g, I can edit the org buffer again. All > > other invocations of that code and the minibuffer message is "executing > > Python code block...", but still emacs hangs until I C-g. > > > > If I look at the *transect* buffer, I see the following. The code runs > just > > fine, but for some reason it does not return. > > > > -k. > > > > > > > > Enthought Canopy Python 2.7.3 | 64-bit | (default, Dec 2 2013, 16:19:29) > > [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin > > Type "help", "copyright", "credits" or "license" for more information. > > import numpy as np > > Start .pythonrc > > End .pythonrc > >>>> > >>>> import numpy as np > > > > x = np.arange(12) > > x = np.arange(12) > > > > > > > open('/var/folders/60/jb7kfrsn2jd90hpcgj4m_wrc0000gn/T/babel-28022EFF/python-28022Yjm', > > 'w').write(str(_)) > > > open('/var/folders/60/jb7kfrsn2jd90hpcgj4m_wrc0000gn/T/babel-28022EFF/python-28022Yjm', > > 'w').write(str(_)) > > > > > > > > > > 'org_babel_python_eoe' > > 'org_babel_python_eoe' > >>>> > >>>> >>> >>> >>> >>> >>> Traceback (most recent call last): > > > > File "", line 1, in > > NameError: name '_' is not defined > >>>> > >>>> >>> >>> 'org_babel_python_eoe' > >>>> import numpy as np > > > > import numpy as np > > x = np.arange(12) > >>>> > >>>> x = np.arange(12) > > > > > >>>> > > > open('/var/folders/60/jb7kfrsn2jd90hpcgj4m_wrc0000gn/T/babel-28022EFF/python-28022lts', > > 'w').write(str(_)) > >>>> > >>>> > > > open('/var/folders/60/jb7kfrsn2jd90hpcgj4m_wrc0000gn/T/babel-28022EFF/python-28022lts', > > 'w').write(str(_)) > > > >>>> > > > >>>> > > 'org_babel_python_eoe' > >>>> > >>>> 'org_babel_python_eoe' > > > > 'org_babel_python_eoe' > >>>> > >>>> > > > > > > > > > --001a11c309469ac98d04f0015ee6 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Hi John,

Yes, you and others in that th= read seem to be experiencing the same problem, although there are also diff= erent issues discussed there.

I'm a bit surpri= sed... With the popularity of python I would expect more org users to have = run into this and it to be fixed, but perhaps it isn't as widely used a= s I thought. Anyway, it is now usable even if the 'print' statement= s don't show up.

=A0 -k.



On Tue, Jan 14, 2014 at 6:04 PM, J= ohn Hendy <jw.hendy@gmail.com> wrote:
On Tue, Jan 14, 2014 at 7:= 38 AM, Ken Mankoff <mankoff@gmail.c= om> wrote:
>
> I've seen various historical issues with :session but it seems I m= ay have a
> different problem. This is the latest org in emacs 24.3. If I do not h= ave
> :session, then everything works just fine.
>

This sounded familiar to me, so I googled around for Org mailing list=
discussions I was involved in related to python. Does this shed any
new light?
- https://www.mail-archive.com/emacs-orgmode@gnu.org/ms= g68542.html

Seems that the discussion ended with the possibility that it was an
emacs change to python.el, and not related to Org, but I'm not sure if<= br> any actions were ever taken regarding that. In any case, the
discussion features a discrepancy between python behavior with
`:session name` and without, so it seemed like a possible candidate to
pass along!



Best regards,
John

> If I C-c C-c in the following code:
>
> #+BEGIN_SRC python :session transect
> import numpy as np
> x =3D np.arange(12)
> #+END_SRC
>
> Emacs hangs the first time with minibuffer message of "Sent
> python-eldoc-setup-code". If I C-g, I can edit the org buffer aga= in. All
> other invocations of that code and the minibuffer message is "exe= cuting
> Python code block...", but still emacs hangs until I C-g.
>
> If I look at the *transect* buffer, I see the following. The code runs= just
> fine, but for some reason it does not return.
>
> =A0 -k.
>
>
>
> Enthought Canopy Python 2.7.3 | 64-bit | (default, Dec =A02 2013, 16:1= 9:29)
> [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
> Type "help", "copyright", "credits" or &= quot;license" for more information.
> import numpy as np
> Start .pythonrc
> End .pythonrc
>>>>
>>>> import numpy as np
>
> x =3D np.arange(12)
> x =3D np.arange(12)
>
>
> open('/var/folders/60/jb7kfrsn2jd90hpcgj4m_wrc0000gn/T/babel-28022= EFF/python-28022Yjm',
> 'w').write(str(_))
> open('/var/folders/60/jb7kfrsn2jd90hpcgj4m_wrc0000gn/T/babel-28022= EFF/python-28022Yjm',
> 'w').write(str(_))
>
>
>
>
> 'org_babel_python_eoe'
> 'org_babel_python_eoe'
>>>>
>>>> >>> >>> >>> >>> >&g= t;> Traceback (most recent call last):
>
> =A0 File "<stdin>", line 1, in <module>
> NameError: name '_' is not defined
>>>>
>>>> >>> >>> 'org_babel_python_eoe' >>>> import numpy as np
>
> import numpy as np
> x =3D np.arange(12)
>>>>
>>>> x =3D np.arange(12)
>
>
>>>>
> open('/var/folders/60/jb7kfrsn2jd90hpcgj4m_wrc0000gn/T/babel-28022= EFF/python-28022lts',
> 'w').write(str(_))
>>>>
>>>>
> open('/var/folders/60/jb7kfrsn2jd90hpcgj4m_wrc0000gn/T/babel-28022= EFF/python-28022lts',
> 'w').write(str(_))
>
>>>>
>
>>>>
> 'org_babel_python_eoe'
>>>>
>>>> 'org_babel_python_eoe'
>
> 'org_babel_python_eoe'
>>>>
>>>>
>
>
>
>

--001a11c309469ac98d04f0015ee6--