From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Schulte Subject: Re: Detect if export is running Date: Sun, 22 Sep 2013 10:57:45 -0600 Message-ID: <87txhc3iba.fsf@cs.unm.edu> References: <87txhd11wy.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:59400) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VNmyG-0001Vu-R5 for emacs-orgmode@gnu.org; Sun, 22 Sep 2013 12:57:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VNmyB-0004Zv-5U for emacs-orgmode@gnu.org; Sun, 22 Sep 2013 12:57:20 -0400 Received: from snape.cs.unm.edu ([64.106.20.59]:35962) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VNmyA-0004ZZ-Vt for emacs-orgmode@gnu.org; Sun, 22 Sep 2013 12:57:15 -0400 In-Reply-To: (Carsten Dominik's message of "Sun, 22 Sep 2013 14:26:07 +0200") 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: Carsten Dominik Cc: Org Mode , Nicolas Goaziou I've used the org-export-file (or somesuch) variable in the past which is only set during export. Carsten Dominik writes: > On 22.9.2013, at 14:22, Nicolas Goaziou wrote: > >> Hello, >> >> Carsten Dominik writes: >> >>> I am trying to write a function that will only run if it is called >>> during the evaluation of babel code during export, so basically during >>> `org-export-execute-babel code'. Do you know if there is a way to >>> detect that this is the case, >> >> There isn't. >> >>> or should I introduce a flag that is set by >>> `org-export-execute-babel-code'? >> >> This may be dangerous. Introducing such a flag means that Babel results >> may be different when exporting and when evaluating a block. > > This is exactly the point. I want to be able to create local variables > and change filter lists during export, while interactive evaluation should > not create local variables in the Org mode buffer. I do not plan to > advertise this flag, but to use it in one very specific function. > > Regards > > - Carsten >> >> >> Regards, >> >> -- >> Nicolas Goaziou > -- Eric Schulte https://cs.unm.edu/~eschulte PGP: 0x614CA05D