emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Auto-refreshing rendered images from org-babel
@ 2014-02-05 17:19 E Sabof
  2014-02-05 23:34 ` Bastien
  0 siblings, 1 reply; 14+ messages in thread
From: E Sabof @ 2014-02-05 17:19 UTC (permalink / raw)
  To: Org-mode

I have the org snippet below. What I would like, is to see the rendered image when I press C-c C-c. I can achieve this with the elisp snippet below. Is there a "proper", or at least a better way of doing this?

Evgeni


#+BEGIN_SRC dot :file files/graphviz/example1.png
digraph test {
    size="6,5";
    home [label = "Home"];
    prod [label = "Products"];
    news [label = "News"];
    cont [label = "Contact"];

    home -> {prod news cont}
}
#+END_SRC


(org-babel-do-load-languages
 'org-babel-load-languages
 '((dot . t)
   ))

(defadvice org-babel-execute:dot (after refresh-images activate)
  (run-with-timer 1 nil 'org-display-inline-images))

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2014-02-06 13:25 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-05 17:19 Auto-refreshing rendered images from org-babel E Sabof
2014-02-05 23:34 ` Bastien
2014-02-06  5:51   ` E Sabof
2014-02-06  8:45     ` Bastien
2014-02-06  9:06       ` E Sabof
2014-02-06  9:10         ` Bastien
2014-02-06  9:39           ` E Sabof
2014-02-06  9:46             ` Rainer M Krug
2014-02-06  9:52               ` Bastien
2014-02-06 10:09                 ` Rainer M Krug
2014-02-06 10:22                   ` Bastien
2014-02-06 10:26                     ` Rainer M Krug
2014-02-06 12:22               ` Eric S Fraga
2014-02-06 13:24                 ` Rainer M Krug

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).