Re: [O] [PATCH] Process hlines in imported tables

2013-04-15 Thread Sebastien Vauban
Hi Eric, Sebastien Vauban wrote: Eric Schulte wrote: I would agree that this (meaning raw implies scalar) should either occur for all languages or for none. I think this is something interesting, but I wonder now if we wouldn't loose more than we would win. I mean: how would one be able to

Re: [O] [PATCH] Process hlines in imported tables

2013-04-15 Thread Sebastien Vauban
Eric, Eric Schulte wrote: Sebastien Vauban wxhgmqzgw...@spammotel.com writes: Sebastien Vauban wrote: Eric Schulte wrote: I would agree that this (meaning raw implies scalar) should either occur for all languages or for none. I think this is something interesting, but I wonder now if we

Re: [O] [PATCH] Process hlines in imported tables

2013-04-06 Thread Eric Schulte
Achim Gratz strom...@nexgo.de writes: Sebastien Vauban writes: Achim Gratz wrote: Elisp is different from all other languages: it doesn't do any processing of strings to begin with for value returns. The reason that Perl processes raw results is that org-babel-result-cond does not switch

Re: [O] [PATCH] Process hlines in imported tables

2013-04-06 Thread Eric Schulte
Sebastien Vauban wxhgmqzgw...@spammotel.com writes: Eric, Eric Schulte wrote: I would agree that this (meaning raw implies scalar) should either occur for all languages or for none. I think this is something interesting, but I wonder now if we wouldn't loose more than we would win. I

Re: [O] [PATCH] Process hlines in imported tables

2013-04-06 Thread Eric Schulte
Of these I would guess that the following 7 should be updated to use the org-babel-result-cond macro. scheme ruby ocaml matlab js haskell asymptote I don't know if we want to try to make these changes before the 8.0 release. I personally could update and test js, scheme, ocaml and

Re: [O] [PATCH] Process hlines in imported tables

2013-04-06 Thread Bastien
Hi Eric, Eric Schulte schulte.e...@gmail.com writes: I'm nervous about such a patch at the last minute. Please go ahead and apply it, that's the best way to find problems. -- Bastien

Re: [O] [PATCH] Process hlines in imported tables

2013-04-06 Thread Eric Schulte
Bastien b...@altern.org writes: Hi Eric, Eric Schulte schulte.e...@gmail.com writes: I'm nervous about such a patch at the last minute. Please go ahead and apply it, that's the best way to find problems. Done. Thanks, -- Eric Schulte http://cs.unm.edu/~eschulte

Re: [O] [PATCH] Process hlines in imported tables

2013-04-04 Thread Sebastien Vauban
Hi Achim, Achim Gratz wrote: Rick Frankel writes: 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|;

Re: [O] [PATCH] Process hlines in imported tables

2013-04-04 Thread Eric Schulte
Sebastien Vauban wxhgmqzgw...@spammotel.com writes: Hi Achim, Achim Gratz wrote: Rick Frankel writes: 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

Re: [O] [PATCH] Process hlines in imported tables

2013-04-04 Thread Rick Frankel
On Wed, Apr 03, 2013 at 08:21:01PM +0200, Achim Gratz wrote: Rick Frankel writes: 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

Re: [O] [PATCH] Process hlines in imported tables

2013-04-04 Thread Rick Frankel
On Thu, Apr 04, 2013 at 03:59:36PM +0200, Sebastien Vauban wrote: Hi Achim, Achim Gratz wrote: Rick Frankel writes: 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

Re: [O] [PATCH] Process hlines in imported tables

2013-04-04 Thread Achim Gratz
Sebastien Vauban writes: Achim Gratz wrote: Elisp is different from all other languages: it doesn't do any processing of strings to begin with for value returns. The reason that Perl processes raw results is that org-babel-result-cond does not switch to the scalar path for this condition,

Re: [O] [PATCH] Process hlines in imported tables

2013-04-04 Thread Sebastien Vauban
Rick, Achim, Eric, Rick Frankel wrote: I agree. raw results should probably be treated as scalar (with cycling of the output to reformat an table :). I think (!) I fully agree with that as well. Just that I wouldn't like more exceptions in the supported languages. So, if it's kindof the new

Re: [O] [PATCH] Process hlines in imported tables

2013-04-04 Thread Sebastien Vauban
Eric, Eric Schulte wrote: I would agree that this (meaning raw implies scalar) should either occur for all languages or for none. I think this is something interesting, but I wonder now if we wouldn't loose more than we would win. I mean: how would one be able to output a real raw result,

Re: [O] [PATCH] Process hlines in imported tables

2013-04-04 Thread Sebastien Vauban
Hi Rick, Rick Frankel wrote: IIUC, wouldn't that be changing the default answer to how to interpret the results just for Perl? While the default answer for all languages seems to be table? It's not. only shell (which doesn't have _value_ results), Is this statement really true, btw?

Re: [O] [PATCH] Process hlines in imported tables

2013-04-03 Thread Achim Gratz
Rick Frankel writes: 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 Elisp is different

Re: [O] [PATCH] Process hlines in imported tables

2013-03-31 Thread Rick Frankel
On Sat, Mar 30, 2013 at 06:43:30PM -0600, Eric Schulte wrote: Rick Frankel r...@rickster.com 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 |

Re: [O] [PATCH] Process hlines in imported tables

2013-03-31 Thread Eric Schulte
Rick Frankel r...@rickster.com writes: On Sat, Mar 30, 2013 at 06:43:30PM -0600, Eric Schulte wrote: Rick Frankel r...@rickster.com writes: *Note* =wrap= and =raw= give same results #+begin_src perl :results raw q[|c1|c2| |- |a|1| |b|2|]; #+end_src #+results: | |

Re: [O] [PATCH] Process hlines in imported tables

2013-03-30 Thread Rick Frankel
On Fri, Mar 29, 2013 at 06:01:21PM -0600, Eric Schulte wrote: Yes and no. :colnames works, but often the header comes from the processing, so they may not be static (I use a lot of call:s). Also, I've been having trouble using the output from raw results as input -- it seems that unless

Re: [O] [PATCH] Process hlines in imported tables

2013-03-30 Thread Eric Schulte
Rick Frankel r...@rickster.com writes: On Fri, Mar 29, 2013 at 06:01:21PM -0600, Eric Schulte wrote: Yes and no. :colnames works, but often the header comes from the processing, so they may not be static (I use a lot of call:s). Also, I've been having trouble using the output from raw

Re: [O] [PATCH] Process hlines in imported tables

2013-03-29 Thread Eric Schulte
Rick Frankel r...@rickster.com writes: Currently, there is no way to include an hline in an imported or converted table. The `org-babel-import-elisp-from-file converts lines starting with '-' (or '|-') to an integer 0, Oh, thanks for pointing this out, I've just pushed up a fix. The single -

Re: [O] [PATCH] Process hlines in imported tables

2013-03-29 Thread Rick Frankel
On Fri, Mar 29, 2013 at 09:04:42AM -0600, Eric Schulte wrote: Rick Frankel r...@rickster.com writes: Users may want to insert a - in their tables, and I think it would be surprising to magically replace floating - characters with hlines. There are numerous existing options for inserting

Re: [O] [PATCH] Process hlines in imported tables

2013-03-29 Thread Eric Schulte
Rick Frankel r...@rickster.com writes: On Fri, Mar 29, 2013 at 09:04:42AM -0600, Eric Schulte wrote: Rick Frankel r...@rickster.com writes: Users may want to insert a - in their tables, and I think it would be surprising to magically replace floating - characters with hlines. There are

[O] [PATCH] Process hlines in imported tables

2013-03-28 Thread Rick Frankel
Currently, there is no way to include an hline in an imported or converted table. The `org-babel-import-elisp-from-file converts lines starting with '-' (or '|-') to an integer 0, because, even though `org-table-to-lisp' will correctly convert lines starting with |-, because