Richard Longland
Richard Longland

Reputation: 13

emacs org-mode inline images not updating

I am having a strange problem with org-mode. When I update/change a linked image it does not update in the buffer.

My test uses babel for convenience, but this is true for all images. I already have the following set: (add-hook 'org-babel-after-execute-hook 'org-redisplay-inline-images)

When I run the following, I see a plot image as expected.

#+BEGIN_SRC R :results output graphics file :file test.png 
    plot(1:2, 1:2, type='p')
    abline(h=1,lty=2)
    abline(v=1.5)
#+END_SRC

But when I change the plotting code (by commenting out one of the abline commands), the displayed result image doesn't update.

It's as if emacs has cached the image, but I cannot find any way to clear that cache.

Upvotes: 1

Views: 551

Answers (1)

galaxy
galaxy

Reputation: 46

It may caused by emacs image cache. Add (add-hook 'org-babel-after-execute-hook 'clear-image-cache) works for me.

Upvotes: 2

Related Questions