From: dmg <dmg@uvic.ca>
To: emacs-orgmode@gnu.org
Subject: Re: evaluation of perl in babel
Date: Mon, 25 Feb 2013 01:57:22 -0800 [thread overview]
Message-ID: <CAEBXXD84hBRzDTQZhP8kjL+5pyLf=aD_AWnqaDreuh2Yckafyg@mail.gmail.com> (raw)
In-Reply-To: <87zjysu3b0.fsf@mn.cs.uvic.ca>
On Mon, Feb 25, 2013 at 1:54 AM, D M German <dmg@uvic.ca> 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
"<table>
<b>a </b>
</table>
"
#+end_src
#+RESULTS:
#+BEGIN_HTML
<table>
<b>a </b>
</table>
#+END_HTML
thanks again for the explanation,
--
--dmg
---
Daniel M. German
http://turingmachine.org
next prev parent reply other threads:[~2013-02-25 9:58 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-24 21:08 evaluation of perl in babel D M German
2013-02-24 21:25 ` dmg
2013-02-24 22:09 ` Achim Gratz
2013-02-25 9:54 ` D M German
2013-02-25 9:57 ` dmg [this message]
2013-02-25 14:11 ` Eric Schulte
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAEBXXD84hBRzDTQZhP8kjL+5pyLf=aD_AWnqaDreuh2Yckafyg@mail.gmail.com' \
--to=dmg@uvic.ca \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.