Skip to content

Images generated by code blocks not refreshed #23

@wmedrano

Description

@wmedrano
  • Arch Linux with "graphviz" installed
  • Emacs 30.1 in graphical mode on Wayland
  • org-preview-html-mode using eww

How to Reproduce

Reproduce

1. Prerequisite

Have graphviz installed. This should provide the dot command. Enable dot in org babel with Elisp:

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

2. Create an org file with dot src code:

#+BEGIN_SRC dot :file dot.png
digraph {
  HelloWorld
}
#+END_SRC

3. Enable org-preview-html-mode

This may ask to evaluate dot (say yes). Org preview then shows an image with a circle with "HelloWorld".

4. Update the text

Run M-x org-preview-html-refresh. This may ask to evaluate the code, say yes.

#+BEGIN_SRC dot :file dot.png
digraph {
  ByeWorld
}
#+END_SRC

5. Result

  • Preview still shows "HelloWorld"
  • M-x find-file for "dot.png" opens an image that says "ByeWorld"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions