[O] data tables produced by shell source block

2014-03-12 Thread Ken Mankoff

The babel sh example here:
http://orgmode.org/worg/org-contrib/babel/intro.html#source-code-execution
 
says (and shows), Babel automatically converts the output into an
Org-mode table.. When I run that same code 

#+name: directories
#+begin_src sh :results replace
  cd ~  du -sc * |grep -v total
#+end_src

I do not get a table. Rather, I get the results in two columns and a
#+begin_example

#+RESULTS: directories
#+begin_example
etc

Can anyone provide a working example for generating a table in shell
mode that can then be used with Python code?

Thanks,

  -k.




Re: [O] data tables produced by shell source block

2014-03-12 Thread Ken Mankoff

Ohp. Nevermind. Sorry for the noise. I have a default of :results
output, and when I set :results value it works.

  -k.


On 2014-03-12 at 16:08, Ken Mankoff wrote:
 The babel sh example here:
 http://orgmode.org/worg/org-contrib/babel/intro.html#source-code-execution
  
 says (and shows), Babel automatically converts the output into an
 Org-mode table.. When I run that same code 

 #+name: directories
 #+begin_src sh :results replace
   cd ~  du -sc * |grep -v total
 #+end_src

 I do not get a table. Rather, I get the results in two columns and a
 #+begin_example

 #+RESULTS: directories
 #+begin_example
 etc

 Can anyone provide a working example for generating a table in shell
 mode that can then be used with Python code?

 Thanks,

   -k.




Re: [O] data tables produced by shell source block

2014-03-12 Thread Thomas S. Dye
Aloha Ken,

Running emacs -Q, initialized to point to an up-to-date Org mode, this
works for me.

I evaluate this source code block so babel recognizes shell source code
blocks:

#+BEGIN_SRC emacs-lisp
(org-babel-do-load-languages
 'org-babel-load-languages
 '((sh . t)))
#+END_SRC

#+RESULTS:
| (sh . t) |

Then run the directories source code block to get this:

#+RESULTS: directories
|   184 | Documents  |
|548528 | Downloads  |
|   3852088 | Library|
|  10208696 | Mail   |
| 0 | Movies |
...

Perhaps you have something in an initialization file?

hth,
Tom

Ken Mankoff mank...@gmail.com writes:

 The babel sh example here:
 http://orgmode.org/worg/org-contrib/babel/intro.html#source-code-execution
  
 says (and shows), Babel automatically converts the output into an
 Org-mode table.. When I run that same code 

 #+name: directories
 #+begin_src sh :results replace
   cd ~  du -sc * |grep -v total
 #+end_src

 I do not get a table. Rather, I get the results in two columns and a
 #+begin_example

 #+RESULTS: directories
 #+begin_example
 etc

 Can anyone provide a working example for generating a table in shell
 mode that can then be used with Python code?

 Thanks,

   -k.




-- 
Thomas S. Dye
http://www.tsdye.com