insert image into text buffer
emacs, insert-image
Solution
Take a look at `iimage-mode`, the inline image minor mode. It's included since Emacs-23, IIRC.
M-x`iimage-mode`
Problem
If I place ``` (insert-image (create-image "/tmp/test.png")) ``` in a buffer, place the cursor after the last parenthesis and evaluate it with `C-x C-e`, then the image `/tmp/test.png` is displayed in the buffer: Pretty neat. But, - I had to put the final parenthesis on a separate line, so the image is close to the left-hand side of the buffer. Is there a way to hide the `(insert-image ...)` text altogether? - The text file contains the `(insert-image ...)` text only, not the image. I'm happy with that, but is there a way to tell emacs to automatically replace all the `(insert-image ...)` expressions by their corresponding images (after the file is opened) without me having to type `C-x C-e` after each one?