all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Grant Rettke <gcr@wisdomandwonder.com>
To: Stig Brautaset <stig@brautaset.org>
Cc: "emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: Re: trying to automatically refresh inline images after org-babel-execute:ditaa
Date: Tue, 11 Oct 2016 12:42:16 -0500	[thread overview]
Message-ID: <CAAjq1mfB36pg+WKxwemH2mY-v+-vdUpdihqDyX6vj3bFv9Sf=Q@mail.gmail.com> (raw)
In-Reply-To: <m04m4iakh5.fsf@laterpay.net>

On Tue, Oct 11, 2016 at 12:01 PM, Stig Brautaset <stig@brautaset.org> 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)

      reply	other threads:[~2016-10-11 17:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-11 17:01 trying to automatically refresh inline images after org-babel-execute:ditaa Stig Brautaset
2016-10-11 17:42 ` Grant Rettke [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAAjq1mfB36pg+WKxwemH2mY-v+-vdUpdihqDyX6vj3bFv9Sf=Q@mail.gmail.com' \
    --to=gcr@wisdomandwonder.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=stig@brautaset.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.