Someone recently posted a tip to add :post (org-redisplay-inline-images) to a SRC block which generates an image in order to freshen the Emacs buffer with the regenerated image each time the block is executed. It works *almost* fine but I have two problems which I hope someone can help with. 1) Priming-the-pump I'm using a document containing a GraphViz graph and running "dot" on it: ---------------------------------------------------------------------- #+BEGIN_SRC dot :cmd dot :cmdline -Tpng :file foo.png :exports results :post (org-redisplay-inline-images) digraph "foo" { rankdir=LR; params -> builders; builders -> objects; objects -> file; } #+END_SRC ---------------------------------------------------------------------- I do "C-c C-c" in the block and the buffer does not display any result. I see the messages: ---------------------------------------------------------------------- No images to display inline executing Dot code block... Wrote /tmp/babel-11819Iqr/ob-input-11819Lrv org-babel-ref-resolve: Reference 'No images to display inline' not found in this buffer ---------------------------------------------------------------------- If I do "C-c hh" to export to HTML I see: ---------------------------------------------------------------------- org-babel-exp processing... No images to display inline [2 times] executing Dot code block... Wrote /tmp/babel-11819Iqr/ob-input-11819kTR org-babel-ref-resolve: Reference 'No images to display inline' not found in this buffer ---------------------------------------------------------------------- And I get no HTML file produced. If I now take out the :post and do "C-c C-c" I get this appearing just after the SRC block as expected: ---------------------------------------------------------------------- #+RESULTS: [[file:foo.png]] ---------------------------------------------------------------------- If I now add back the ":post" and do "C-c C-c" again I get the inlined image. I can now edit the SRC block and repeat the "C-c C-c" and I am pleased to see the figure refresh each time. It's great! But, it needs this "pump priming". 2) Post-priming, still no HTML export After this "priming the pump" is done the second problem is that still a "C-c hh" does not produce an exported HTML file. Similar messages: ---------------------------------------------------------------------- org-babel-exp processing... No images to display inline Inline image display turned off No images to display inline executing Dot code block... Wrote /tmp/babel-11819Iqr/ob-input-11819zYx org-babel-ref-resolve: Reference 'No images to display inline' not found in this buffer ---------------------------------------------------------------------- Finally, if I remove the :post but leave the "#+RESULTS:" I can do a successful "C-c hh". So, the upshot is I have to keep adding and removing the :post to make things work in different contexts. This is obviously not so smooth. Is there some way to both have my cake an eat it too? Thanks! -Brett.