[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] [PATCH] Process hlines in imported tables
From: |
Rick Frankel |
Subject: |
Re: [O] [PATCH] Process hlines in imported tables |
Date: |
Sun, 31 Mar 2013 08:29:00 -0400 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Sat, Mar 30, 2013 at 06:43:30PM -0600, Eric Schulte wrote:
> Rick Frankel <address@hidden> writes:
> > *Note* =wrap= and =raw= give same results
> > #+begin_src perl :results raw
> > q[|c1|c2|
> > |-
> > |a|1|
> > |b|2|];
> > #+end_src
> >
> > #+results:
> > | | c1 | c2 |
> > | | - | |
> > | | a | 1 |
> > | | b | 2 |
> >
>
> This is a problem in the results returned by ob-perl, not in the results
> insertion mechanism. Given what is actually being returned by that code
> block the results make sense.
>
> #+name: perl-example
> #+begin_src perl :results raw
> q[|c1|c2|
> |-
> |a|1|
> |b|2|];
> #+end_src
> If we add verbatim (which inhibits interpretation as a value, which can
> often result in a list or table result), then we get what I assume you
> expect.
> #+name: perl-example
> #+begin_src perl :results verbatim raw
> q[|c1|c2|
> |-
> |a|1|
> |b|2|];
> #+end_src
>
> #+RESULTS: perl-example
> | c1 | c2 |
> |----+----|
> | a | 1 |
> | b | 2 |
>
Missed verbatim. Thanks for the pointer, it works, but i think that
perl is double-processing returned values. If we do the same things in
elisp i get (my) expected results:
#+begin_src elisp :results raw
"|c1|c2|
|-
|a|1|
|b|2|";
#+end_src
#+results:
| c1 | c2 |
|----+----|
| a | 1 |
| b | 2 |
*NOTE* this will not properly clean-up the results, but keep inserting
more copies.
#+begin_src elisp :results raw verbatim
"|c1|c2|
|-
|a|1|
|b|2|";
#+end_src
#+results:
"|c1|c2|
|-
|a|1|
|b|2|"
> > #+begin_src perl :results raw output
> > print q[|c1|c2|
> > |-
> > |a|1|
> > |b|2|
> > ];
Yes, this was included to show the inconsistency between value and
output returns. BTW, "raw output" and "raw output verbatim" generate
the same results.
>
> Footnotes:
> [1] http://orgmode.org/worg/org-contrib/babel/header-args.html
I will take a look and see if i come up with anything else. In
general, what I have found with babel processing is that there is
major inconsistency between the results processing in different
languages. Somehow, I would think that the same output (modulo
sytnactic diferences) should generate the same results regardless of
language.
rick