From mboxrd@z Thu Jan 1 00:00:00 1970 From: Grant Rettke Subject: Re: trying to automatically refresh inline images after org-babel-execute:ditaa Date: Tue, 11 Oct 2016 12:42:16 -0500 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:42141) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bu14G-0003gW-Qt for emacs-orgmode@gnu.org; Tue, 11 Oct 2016 13:42:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bu14E-00070B-Ea for emacs-orgmode@gnu.org; Tue, 11 Oct 2016 13:42:19 -0400 Received: from mail-it0-x233.google.com ([2607:f8b0:4001:c0b::233]:37798) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bu14E-0006zq-9L for emacs-orgmode@gnu.org; Tue, 11 Oct 2016 13:42:18 -0400 Received: by mail-it0-x233.google.com with SMTP id z65so26588384itc.0 for ; Tue, 11 Oct 2016 10:42:17 -0700 (PDT) In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Stig Brautaset Cc: "emacs-orgmode@gnu.org" On Tue, Oct 11, 2016 at 12:01 PM, Stig Brautaset wrote: > Hello! > > I'm trying to automatically update inline ditaa images, by adding this > advice: > > ,---- > | (advice-add 'org-babel-execute:ditaa > | :after > | (lambda (a &rest b) > | (message "my sage advice") > | (org-redisplay-inline-images))) > `---- > > When hitting =C-c C-c= in a =#+begin_src ditaa= block I *do* get my sage > advice printed to *Messages*, but inline images just blinks out of > existence. Is the image overlay removed at a higher level? > > Any advice (hah!) welcome. (defun help/org-babel-after-execute-hook () "HELP settings for the `org-babel-after-execute-hook'. This does not interfere with exports. Attribution: URL `https://lists.gnu.org/archive/html/emacs-orgmode/2015-01/msg00534.html'" (interactive) (org-redisplay-inline-images)) (add-hook 'org-babel-after-execute-hook #'help/org-babel-after-execute-hook)