From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rainer M Krug Subject: Re: Auto-refreshing rendered images from org-babel Date: Thu, 06 Feb 2014 10:46:31 +0100 Message-ID: <52F359F7.10106@krugs.de> References: <874n4dh3zn.fsf@gmail.com> <87r47h9lrw.fsf@bzg.ath.cx> <87ob2k23i1.fsf@gmail.com> <87ha8cocic.fsf@bzg.ath.cx> <87mwi41uhl.fsf@gmail.com> <87y51omwsk.fsf@bzg.ath.cx> <87ioss1swv.fsf@gmail.com> Reply-To: Rainer@krugs.de Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="9P3XNIkBcSBMrTLpnKt4xliohWgx0rwIK" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:60621) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WBLXc-0002we-EN for emacs-orgmode@gnu.org; Thu, 06 Feb 2014 04:46:44 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WBLXX-00012u-MV for emacs-orgmode@gnu.org; Thu, 06 Feb 2014 04:46:40 -0500 Received: from mail-wi0-f181.google.com ([209.85.212.181]:42374) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WBLXX-00012h-HJ for emacs-orgmode@gnu.org; Thu, 06 Feb 2014 04:46:35 -0500 Received: by mail-wi0-f181.google.com with SMTP id hi5so1384515wib.14 for ; Thu, 06 Feb 2014 01:46:34 -0800 (PST) In-Reply-To: <87ioss1swv.fsf@gmail.com> 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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: E Sabof , Bastien Cc: Org-mode This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --9P3XNIkBcSBMrTLpnKt4xliohWgx0rwIK Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 02/06/14, 10:39 , E Sabof wrote: >=20 > Bastien writes: >=20 >> Ok, thanks. I'd rather have ob-dot.el and friends have their own=20 >> hooks (e.g. org-babel-execute:dot-hook). But I'm not yet >> convince, as `org-redisplay-inline-images' is already bound to `C-c >> C-x C-M-v'. >=20 > I'm not a heavy babel user, but maybe something like this could be > run from each time babel evaluates a block. A person wanting to run > code for one language, but not another seems reasonable. >=20 > (let* ((language (the-language-being-executed))) (run-hooks (intern > (format "org-babel-execute:%s-hook" language)))) >=20 > Alternatively a variable similar to org-babel-last-executed-language > could be set before the existing hook runs, and customizations could > be made from there. I would go one step further - the possibility to define org-babel-after-execute-hook as a header argument. This would make it possible to refresh the inline images only after certain blocks are executed and not after others. Cheers, Rainer >=20 > Evgeni >=20 --=20 Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Stellenbosch University South Africa Tel : +33 - (0)9 53 10 27 44 Cell: +33 - (0)6 85 62 59 98 Fax : +33 - (0)9 58 10 27 44 Fax (D): +49 - (0)3 21 21 25 22 44 email: Rainer@krugs.de Skype: RMkrug --9P3XNIkBcSBMrTLpnKt4xliohWgx0rwIK Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.22 (Darwin) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBAgAGBQJS81n8AAoJENvXNx4PUvmCgwoH/0EX6JUE7acVHA8JoHqs2/2S ngak/MYiwmOS/3OdjjOIuZJSk9n+nTfeq6yLvRCvQ4qrgGF4MpsfHGh7GFnxYILc 70voHe/0DB/ZU3M6nLFCfrDcGRnMxP2mBDTJ7K0LjeJfTAHQzjlcV++ZXJd08bZY OYD4wcm+vJMqTfWhXfUQnkakXcjY3+xkaNPZfmB12i0+jwSjcUXlwRifc9g0MEzj OloEdgIzzyB+yHms+LkL6Z7KXhry6rh6G8nUpOxnvb086X5OB0fXLJHE1/pwAx3z zUxXNmqCfd9a+kh/ROUUPPTqCGKJNFaA93gBDqXcPpA6gTqfcfT5yJdX8qo0Xhc= =6Tbg -----END PGP SIGNATURE----- --9P3XNIkBcSBMrTLpnKt4xliohWgx0rwIK--