Dov Grobgeld <dov.grobg...@gmail.com> writes: > Thanks! This is exactly what I was looking for. And indeed it is as easy to > output a graph from python (or any other language) as it is from ditaa: > > * A ditaa image > #+begin_src ditaa :file example.png
[...] > * A Python image > #+begin_src python :file circle.png [...] > I'm wondering over one thing though. When exporting to HTML, the ditaa > source code is omitted, but the python source code is included. Is there any > way of controlling this in begin_src? Hi Dov, Yes, see the documentation of the :exports header argument. http://orgmode.org/manual/Exporting-code-blocks.html#Exporting-code-blocks Header arguments such as :exports can be set in various different ways. http://orgmode.org/manual/Using-header-arguments.html#Using-header-arguments The difference in behavior you see stems from the value of the variable org-babel-default-header-args, and the language-specific versions of that variable. Note below that although :exports in general defaults to "code", for ditaa this default is overridden to "results". The reason for which was that ditaa code is typically going to be there to generate graphics, whereas that is only occasionally true for python. #+begin_src emacs-lisp :results pp org-babel-default-header-args #+end_src #+results: : ((:session . "none") : (:results . "replace") : (:exports . "code") : (:cache . "no") : (:noweb . "no") : (:hlines . "no") : (:tangle . "no")) #+begin_src emacs-lisp :results pp org-babel-default-header-args:ditaa #+end_src #+results: : ((:results . "file") : (:exports . "results")) #+begin_src emacs-lisp :results pp org-babel-default-header-args:python #+end_src #+results: : nil Dan > > Thanks! > Dov > > > On Sun, Nov 28, 2010 at 19:27, Dan Davison <dandavis...@gmail.com> wrote: > >> (add-hook 'org-babel-after-execute-hook >> (lambda () (org-display-inline-images nil t))) >> > _______________________________________________ > Emacs-orgmode mailing list > Please use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode _______________________________________________ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode