From mboxrd@z Thu Jan 1 00:00:00 1970 From: Simon Thum Subject: Re: export ICal without evaluate code block Date: Wed, 26 Feb 2014 21:00:14 +0100 Message-ID: <530E47CE.9020209@gmx.de> References: <20140224223948.GA9224@localhost> <87y50yrm97.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:39278) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WIkeW-0001QJ-CX for emacs-orgmode@gnu.org; Wed, 26 Feb 2014 15:00:30 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WIkeQ-0008Rv-K8 for emacs-orgmode@gnu.org; Wed, 26 Feb 2014 15:00:24 -0500 Received: from mout.gmx.net ([212.227.17.22]:50194) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WIkeQ-0008RI-Aq for emacs-orgmode@gnu.org; Wed, 26 Feb 2014 15:00:18 -0500 Received: from [192.168.0.12] ([37.24.149.129]) by mail.gmx.com (mrgmx003) with ESMTPSA (Nemesis) id 0LvEZe-1XHtj32I2k-010OqD for ; Wed, 26 Feb 2014 21:00:15 +0100 In-Reply-To: <87y50yrm97.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: Nicolas Goaziou , OSiUX Cc: emacs-orgmode@gnu.org Nicolas, I recently had a similar problem, though in my case the iClaendar export wasn't even reached because emacs started asking in other exports that came before. I have some worries here; Why is it so hard to avoid evaluation/modification in org files during export? I use -batch, I would have tought that was enough, but if I'm getting your answer below right, then setting those 2 parameters is not enough either, because some backends fiddle with them? I have searched the docs but did not find anything about backends overriding these settings. Enlightenment is appreciated. Cheers, Simon On 02/26/2014 03:17 PM, Nicolas Goaziou wrote: > Hello, > > OSiUX writes: > >> Calendar can be exported without evaluating >> babel code blocks? >> >> I try setting in .emacs: >> >> (setq org-confirm-babel-evaluate nil) >> (setq org-export-babel-evaluate nil) >> >> but always evaluate when exports iCalendar :-( > > You could use something like this: > > (defun my-toggle-off-babel (backend) > (when (org-export-derived-backend-p backend 'icalendar) > (org-set-local 'org-confirm-babel-evaluate nil) > (org-set-local 'org-export-babel-evaluate nil))) > > (add-hook org-export-before-processing-hook #'my-toggle-off-babel) > > > Regards, >