英文:
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.
英文:
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.
答案1
得分: 0
可能是由于Emacs图像缓存引起的。
添加(add-hook 'org-babel-after-execute-hook 'clear-image-cache)对我有用。
英文:
It may caused by emacs image cache.
Add (add-hook 'org-babel-after-execute-hook 'clear-image-cache) works for me.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论