From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Thomas S. Dye" Subject: Re:[babel] Re: What is output for org-babel? Date: Fri, 6 Nov 2009 06:15:21 -1000 Message-ID: References: <4af2e095.0706c00a.3de8.57c8@mx.google.com> Mime-Version: 1.0 (Apple Message framework v936) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N6RTI-0005cW-Gg for emacs-orgmode@gnu.org; Fri, 06 Nov 2009 11:15:32 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N6RTD-0005c0-G0 for emacs-orgmode@gnu.org; Fri, 06 Nov 2009 11:15:31 -0500 Received: from [199.232.76.173] (port=40105 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N6RTD-0005bx-B2 for emacs-orgmode@gnu.org; Fri, 06 Nov 2009 11:15:27 -0500 Received: from outbound-mail-139.bluehost.com ([67.222.39.29]:34617) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1N6RTD-00013C-0m for emacs-orgmode@gnu.org; Fri, 06 Nov 2009 11:15:27 -0500 In-Reply-To: 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: andrea Crotti Cc: emacs-orgmode@gnu.org On Nov 6, 2009, at 2:13 AM, andrea Crotti wrote: > Darlan Cavalcante Moreira gmail.com> writes: > >> >> However, if the code is sent to the python interpreter as it is, >> then it >> bugs me >> why "import os; os.listdir(os.getcwd())" didn't work. > > I tried to look at the code of org-babel-python > but it's a bit too complicated to understand how my body > is manipulated... > > For the second question I made, it would be even > better to have a mechanism that allows to insert > logical parts of another buffer in my org-mode file. > > Something like > > #+INCLUDE file.hs::fun_def > > Where fun_def is the definition of a function. > programming modes know how to split this kind of things, so > also org-mode could now, right? > > > > _______________________________________________ > Emacs-orgmode mailing list > Remember: use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode Hi Andrea, If I understand your question correctly, there might be several ways to achieve this with existing org-babel functions. Here are two that might work. 1) Establish a :session and make fun_def available there, or 2) Explore the possibilities offered by Library of Babel. This is something I haven't explored yet, but it appears to be designed for the problem you're describing. HTH, Tom