[Top][All Lists]

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

Re: [O] Auto-refreshing rendered images from org-babel

From: E Sabof
Subject: Re: [O] Auto-refreshing rendered images from org-babel
Date: Thu, 06 Feb 2014 05:51:02 +0000
User-agent: mu4e; emacs

Thanks. I've changed it to the version below, which covers my needs. I think it 
would make sense as a (default?) feature for ob-dot, ob-ditaa, and any other 
babel language that renders images.


;; Must be defined in a lexical environment
(defun es-org-babel-refresh-images-after-execution ()
  (let (refresh-and-remove-self)
    (setq refresh-and-remove-self
          (lambda ()
            (remove-hook 'org-babel-after-execute-hook
    (add-hook 'org-babel-after-execute-hook refresh-and-remove-self)))

(defadvice org-babel-execute:dot (after refresh-images activate)

Bastien <address@hidden> writes:

> E Sabof <address@hidden> writes:
>> I have the org snippet below. What I would like, is to see the
>> rendered image when I press C-c C-c. I can achieve this with the elisp
>> snippet below. Is there a "proper", or at least a better way of doing
>> this?
> Not tested but should work:
> (add-hook 'org-babel-after-execute-hook 'org-redisplay-inline-images)
> HTH,

reply via email to

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