From mboxrd@z Thu Jan 1 00:00:00 1970 From: dmg Subject: Re: evaluation of perl in babel Date: Mon, 25 Feb 2013 01:57:22 -0800 Message-ID: References: <87hal1whbc.fsf@mn.cs.uvic.ca> <87wqtxfjpb.fsf@Rainer.invalid> <87zjysu3b0.fsf@mn.cs.uvic.ca> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Return-path: Received: from eggs.gnu.org ([208.118.235.92]:47524) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U9uoy-0002Vd-8L for emacs-orgmode@gnu.org; Mon, 25 Feb 2013 04:58:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U9uou-00067x-BT for emacs-orgmode@gnu.org; Mon, 25 Feb 2013 04:58:08 -0500 Received: from mail-wi0-f181.google.com ([209.85.212.181]:62144) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U9uou-00067g-4l for emacs-orgmode@gnu.org; Mon, 25 Feb 2013 04:58:04 -0500 Received: by mail-wi0-f181.google.com with SMTP id hm6so2941332wib.8 for ; Mon, 25 Feb 2013 01:58:03 -0800 (PST) In-Reply-To: <87zjysu3b0.fsf@mn.cs.uvic.ca> 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: emacs-orgmode@gnu.org On Mon, Feb 25, 2013 at 1:54 AM, D M German wrote: > > Achim> You may misunderstand some things, or I don't understand what you are > Achim> asking. It is (at least currently) the responsibility of the Perl > Achim> program (or any other Babel language) to deliver the result in such a > Achim> way that it can be interpreted correctly by the result type chosen (in > Achim> other word, the program output must be valid Org syntax in the given > Achim> context). You can't have the same program produce tables, vectors and > Achim> LaTeX output just by switching the results type. > > I understand. But what I want is the output to be wrapped accordingly, > and my script to deliver exactly the output as expected. So say I want > to generate HTML in my script, I can use :results output, but then I > have to change to replace the #+being_example with #+begin_HTML. > > I guess that I can generate a two dimensional table with perl too > using output (printing the necessary | and \n), but then it will be > wrapped with #+begin_example. Ok, I got it. What I need is to return a string with whatever I need. A bit cumbersome, but I can live with it #+begin_src perl :results html "a
" #+end_src #+RESULTS: #+BEGIN_HTML a
#+END_HTML thanks again for the explanation, -- --dmg --- Daniel M. German http://turingmachine.org