On 02/06/14, 10:39 , E Sabof wrote: > > Bastien writes: > >> Ok, thanks. I'd rather have ob-dot.el and friends have their own >> 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'. > > 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. > > (let* ((language (the-language-being-executed))) (run-hooks (intern > (format "org-babel-execute:%s-hook" language)))) > > 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 > > Evgeni > -- 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