From mboxrd@z Thu Jan 1 00:00:00 1970 From: Henning Redestig Subject: org babel before excute hook Date: Fri, 11 Oct 2013 15:56:28 +0200 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=047d7b4141762c133304e8777c10 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:52098) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VUdCh-0007fG-H5 for emacs-orgmode@gnu.org; Fri, 11 Oct 2013 09:56:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VUdCg-0007Zr-9O for emacs-orgmode@gnu.org; Fri, 11 Oct 2013 09:56:31 -0400 Received: from mail-ie0-x229.google.com ([2607:f8b0:4001:c03::229]:58454) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VUdCg-0007Ze-3j for emacs-orgmode@gnu.org; Fri, 11 Oct 2013 09:56:30 -0400 Received: by mail-ie0-f169.google.com with SMTP id tp5so8554810ieb.0 for ; Fri, 11 Oct 2013 06:56:29 -0700 (PDT) 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: emacs-orgmode@gnu.org --047d7b4141762c133304e8777c10 Content-Type: text/plain; charset=ISO-8859-1 I collaborate with different people on the same orgfile which contains many source blocks that generate graphics by e.g. :results graphics abc.pdf It can happen that I or someone else accidentally create another independent source block that overwrites my abc.pdf which is of course very bad. I would like to add functionality so that org-babel-execute-src-block checks if in :results graphics FILE, FILE is already referred to by another source block and if so refuse to evaluate. However, I only see a org-babel-after-execute-hook but no org-babel-before-execute-hook any reason for this? I could try to write a patch but thought I'd ask first. ....or if there is an even better approach to avoid overwriting output from different source blocks.. //Henning --047d7b4141762c133304e8777c10 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
I collaborate with different= people on the same orgfile which contains many source blocks that generate= graphics by e.g. :results graphics abc.pdf

It can happen that= I or someone else accidentally create another independent source block tha= t overwrites my abc.pdf which is of course very bad.

I would like to add functionality so that org-babel-execute-src-b= lock checks if in :results graphics FILE, FILE is already referred to by an= other source block and if so refuse to evaluate.

However, I o= nly see a org-babel-after-execute-hook but no org-babel-before-execute-hook=

any reason for this? I could try to write a patch but thought I&#= 39;d ask first.

....or if there is an even better approach to= avoid overwriting output from different source blocks..

//Hen= ning
--047d7b4141762c133304e8777c10--