emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] images rendering after execution?


From: John Kitchin
Subject: Re: [O] images rendering after execution?
Date: Wed, 18 Nov 2015 18:19:31 -0500
User-agent: mu4e 0.9.13; emacs 25.0.50.1

I use this in my init files:

;; refresh images after running a block
(defun org-refresh-images ()
  "Refreshes images displayed inline."
  (interactive)
  (org-remove-inline-images)
  (org-display-inline-images))

(add-hook 'org-babel-after-execute-hook
          (lambda () (org-refresh-images)))

it refreshes images each time I run a block.

Tom writes:

> I know I can insert an image with something like:
>
> #+begin_src python :session :results file
> savefig('test.png')
> 'test.png'
> #+end_src
>
> #+RESULTS:
> [[file:test.png]]
>
> However, even when I choose to display images inline, the output from a
> computation like this will always be rendered as a link; only after
> toggling image display twice will the image render inline.
>
> Is there some option that always renders images returned by source code
> blocks inline immediately? None of the options I found in the documentation
> seemed to work.
>
> Thanks,
> Tom

--
Professor John Kitchin
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
@johnkitchin
http://kitchingroup.cheme.cmu.edu



reply via email to

[Prev in Thread] Current Thread [Next in Thread]