From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Hendy Subject: Re: Fwd: run python from org, draft Date: Fri, 29 Mar 2013 09:57:54 -0500 Message-ID: References: <5154BC51.1050001@easy-emacs.de> <5155A97D.2090907@easy-emacs.de> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=e0cb4efe33defbfde604d9117e4d Return-path: Received: from eggs.gnu.org ([208.118.235.92]:57830) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ULakk-000081-2q for emacs-orgmode@gnu.org; Fri, 29 Mar 2013 10:58:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ULake-0001fW-GJ for emacs-orgmode@gnu.org; Fri, 29 Mar 2013 10:58:02 -0400 Received: from mail-lb0-f182.google.com ([209.85.217.182]:54013) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ULake-0001fL-3y for emacs-orgmode@gnu.org; Fri, 29 Mar 2013 10:57:56 -0400 Received: by mail-lb0-f182.google.com with SMTP id z13so387791lbh.13 for ; Fri, 29 Mar 2013 07:57:55 -0700 (PDT) In-Reply-To: <5155A97D.2090907@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: Gary Oberbrunner , emacs-orgmode --e0cb4efe33defbfde604d9117e4d Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Fri, Mar 29, 2013 at 9:47 AM, Andreas R=C3=B6hler < andreas.roehler@easy-emacs.de> wrote: > Hi Gary, > > > Am 29.03.2013 13:11, schrieb Gary Oberbrunner: > > Does this assume org-babel-python-mode is set to 'python-mode? The >> default >> is 'python, I believe. I don't think you should unconditionally >> call py-send-string-return-output like that. >> >> Also, why would you avoid calling org-babel-python-evaluate? Where in >> your >> patch would it account for the setting of session, result-type or >> result-params? >> >> >> > with current > > GNU Emacs 24.3.1 (i686-pc-linux-gnu, GTK+ Version 2.24.14) of 2013-03-05 > > Org-mode version 7.9.3f (release_7.9.3f-17-g7524ef @ > MY_PATH/emacs-24.3/lisp/org/) > > python from org-source seems completely broken. > > For example: > > #+BEGIN_SRC python > 1+2 > #+END_SRC > > #+RESULTS: > : None > > Weird. With all the testing we did last week, I'm surprised that this is the case with me as well. I'm also getting no results with Org 8.0-pre and Emacs 24.3.1. John > > While the patched ob-python.el at least gives a result. > As attached png shows, a py-shell buffer is visible, which should not. > And some more back-sides. So far following your arguments. > > Just wanted to look for the spot where to fix it. > Maybe not the right one yet, just a study. > > So let's go on until a convenient solution is found, > > Andreas > > >> On Thu, Mar 28, 2013 at 5:55 PM, Andreas R=C3=B6hler < >> andreas.roehler@easy-emacs.de> wrote: >> >> Hi, >>> >>> as running python from org-source has been reported broken, >>> herewith a patch, which allows basic usage. >>> >>> Requires python-mode.el-6.1 >>> >>> https://launchpad.net/python-****mode/trunk/6.1.1/+download/** >>> python-mode.el-6.1.1.tar.gz>> mode/trunk/6.1.1/+download/**python-mode.el-6.1.1.tar.gz >>> > >>> >>> Just a draft, not thought as implementation, >>> >>> Andreas >>> >>> >> >> >> > --e0cb4efe33defbfde604d9117e4d Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

= On Fri, Mar 29, 2013 at 9:47 AM, Andreas R=C3=B6hler <= andreas.= roehler@easy-emacs.de> wrote:
Hi Gary,

> Am 29.03.2013 13:11, schrieb Gary Oberbrunner:

Does this assume org-babel-python-mode is set to 'python-mode? =C2=A0Th= e default
is 'python, I believe. =C2=A0I don't think you should unconditional= ly
call py-send-string-return-output like that.

Also, why would you avoid calling org-babel-python-evaluate? =C2=A0Where in= your
patch would it account for the setting of session, result-type or
result-params?



with current

GNU Emacs 24.3.1 (i686-pc-linux-gnu, GTK+ Version 2.24.14) of 2013-03-05
Org-mode version 7.9.3f (release_7.9.3f-17-g7524ef @ MY_PATH/emacs-24.3/lis= p/org/)

python from org-source seems completely broken.

For example:

#+BEGIN_SRC python
1+2
#+END_SRC

#+RESULTS:
: None


Weird. With all the testing we d= id last week, I'm surprised that this is the case with me as well. I= 9;m also getting no results with Org 8.0-pre and Emacs 24.3.1.

John
=C2=A0

While the patched ob-python.el at least gives a result.
As attached png shows, a py-shell buffer is visible, which should not.
And some more back-sides. So far following your arguments.

Just wanted to look for the spot where to fix it.
Maybe not the right one yet, just a study.

So let's go on until a convenient solution is found,

Andreas


On Thu, Mar 28, 2013 at 5:55 PM, Andreas R=C3=B6hler <
andreas.= roehler@easy-emacs.de> wrote:

Hi,

as running python from org-source has been reported broken,
herewith a patch, which allows basic usage.

Requires python-mode.el-6.1

https://launchpad.net/python-**mode/trunk/6.1.1/+dow= nload/**
python-mode.el-6.1.1.tar.gz<ht= tps://launchpad.net/python-mode/trunk/6.1.1/+download/pyt= hon-mode.el-6.1.1.tar.gz>

Just a draft, not thought as implementation,

Andreas






--e0cb4efe33defbfde604d9117e4d--