[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] data tables produced by shell source block
From: |
Thomas S. Dye |
Subject: |
Re: [O] data tables produced by shell source block |
Date: |
Wed, 12 Mar 2014 10:40:45 -1000 |
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 <address@hidden> 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