From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dan Davison Subject: Re: What is output for org-babel? Date: Sun, 08 Nov 2009 15:20:41 -0500 Message-ID: <87skcoydie.fsf@stats.ox.ac.uk> References: <4af2e095.0706c00a.3de8.57c8@mx.google.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N7EFo-0003eY-Iy for emacs-orgmode@gnu.org; Sun, 08 Nov 2009 15:20:52 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N7EFi-0003bZ-GF for emacs-orgmode@gnu.org; Sun, 08 Nov 2009 15:20:51 -0500 Received: from [199.232.76.173] (port=60627 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N7EFi-0003bW-AN for emacs-orgmode@gnu.org; Sun, 08 Nov 2009 15:20:46 -0500 Received: from markov.stats.ox.ac.uk ([163.1.210.1]:61582) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1N7EFh-0000gn-Q1 for emacs-orgmode@gnu.org; Sun, 08 Nov 2009 15:20:46 -0500 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Darlan Cavalcante Moreira Cc: emacs-orgmode@gnu.org, andrea Crotti Darlan Cavalcante Moreira writes: > COmments are inline. > > At Thu, 5 Nov 2009 11:17:39 +0000 (UTC), > andrea Crotti wrote: >> >> I'm with org-mode 6.31a, I was trying to >> get output in the exported files but I never see the output. >> >> So I investigate and for example this >> >> #+BEGIN_SRC python >> import os; os.listdir(os.getcwd()) >> #+END_SRC > > This does not return anything for me either, but > #+BEGIN_SRC python > import os > os.listdir(os.getcwd()) > #+END_SRC > works as expected. This is strange, since "import os; os.listdir(os.getcwd())" > is valid and will work if typed in the python interpreter directly. This is a limitation of the current implementation of :results value evaluation. For now, while we work out a good solution, semi-colon separated statements on the same line (as well as multiline continuations) should be avoided when using :results value (the default). It does work with :results output: #+BEGIN_SRC python :results output import os; print os.listdir(os.getcwd()) #+END_SRC Thanks for pointing this problem out. Dan