[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] [BUG][babel] ":result output table" doesn't work for python code
From: |
Eric Schulte |
Subject: |
Re: [O] [BUG][babel] ":result output table" doesn't work for python code blocks |
Date: |
Wed, 27 Apr 2011 07:16:55 -0600 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
>> perhaps the data could be printed as an Org-mode table, and then the
>> "output raw" :results combination could be used, or the output could
>> be sent through another code block to convert the string to a table.
>
> That's what I do at the moment, actually.
>
> Mind you, org is able to take the output and convert it to a table
> easily enough with =C-c |= (org-table-create-or-convert-from-region)
> operating on the output if selected as a region. Would it be possible
> to post-process the output from babel automatically using this method
> (maybe with a hook?) with the output selected if ":results output
> table", say, were specified? That alone would be sufficient for 90% of
> the cases...
>
Ah, that sounds like a much more satisfying and general solution than
the previous approach of parsing output in language-specific manners.
Although I don't have time at the moment, I will put automatic
conversion of org type results onto my todo list, so that at some point
in the future, code like the following will be possible...
#+source: org-results
#+begin_src sh :results output org
echo "| 1 |"
echo "| 2 |"
#+end_src
#+begin_src emacs-lisp :var in=org-results
(listp in)
#+end_src
#+results:
: t
>
> Apologies for the sporadic nature of my responses lately: I have been on
> holiday (much needed!) and purposely without email most of the time!
>
No need to apologize! I try to do the same when on vacation.
Best -- Eric
>
> Thanks,
> eric
--
Eric Schulte
http://cs.unm.edu/~eschulte/
- [O] [BUG][babel] ":result output table" doesn't work for python code blocks, Ethan Ligon, 2011/04/14
- Re: [O] [BUG][babel] ":result output table" doesn't work for python code blocks, Eric Schulte, 2011/04/14
- Re: [O] [BUG][babel] ":result output table" doesn't work for python code blocks, Eric S Fraga, 2011/04/15
- Re: [O] [BUG][babel] ":result output table" doesn't work for python code blocks, Eric Schulte, 2011/04/15
- Re: [O] [BUG][babel] ":result output table" doesn't work for python code blocks, Eric S Fraga, 2011/04/22
- Re: [O] [BUG][babel] ":result output table" doesn't work for python code blocks, Eric Schulte, 2011/04/26
- Re: [O] [BUG][babel] ":result output table" doesn't work for python code blocks, Eric S Fraga, 2011/04/27
- Re: [O] [BUG][babel] ":result output table" doesn't work for python code blocks,
Eric Schulte <=
- Re: [O] [BUG][babel] ":result output table" doesn't work for python code blocks, Eric S Fraga, 2011/04/27