From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: export ICal without evaluate code block Date: Wed, 26 Feb 2014 17:46:02 +0100 Message-ID: <87d2i9styt.fsf@gmail.com> References: <20140224223948.GA9224@localhost> <87y50yrm97.fsf@gmail.com> <20140226160613.GA8037@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:43540) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WIhc9-0003tv-77 for emacs-orgmode@gnu.org; Wed, 26 Feb 2014 11:45:49 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WIhc4-0004vY-Gg for emacs-orgmode@gnu.org; Wed, 26 Feb 2014 11:45:45 -0500 Received: from mail-wi0-x234.google.com ([2a00:1450:400c:c05::234]:38708) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WIhc4-0004vL-1s for emacs-orgmode@gnu.org; Wed, 26 Feb 2014 11:45:40 -0500 Received: by mail-wi0-f180.google.com with SMTP id hm4so2387210wib.13 for ; Wed, 26 Feb 2014 08:45:39 -0800 (PST) In-Reply-To: <20140226160613.GA8037@localhost> (OSiUX's message of "Wed, 26 Feb 2014 13:06:14 -0300") 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: OSiUX Cc: emacs-orgmode@gnu.org OSiUX writes: > El mi=C3=A9, 26 feb 2014, Nicolas Goaziou dec=C3=ADa: >> 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) > > Thanks Nicolas, your workaround don't work for me: > > Debugger entered--Lisp error: > (void-variable org-export-before-processing-hook) > (add-hook org-export-before-processing-hook (function my-toggle-off-b= abel)) I forgot a quote: (add-hook 'org-export-before-processing-hook #'my-toggle-off-babel)) > Looking the source I found this commit: > > commit 69ebb265be118ea1a37afb9603c4582d25d33d09 > Author: Bastien Guerry > Date: Wed Apr 10 18:40:47 2013 +0200 > > ox-icalendar.el (org-icalendar-export-current-agenda): Do not evalu= ate babel co$ > > * ox-icalendar.el (org-icalendar-export-current-agenda): Do > not evaluate babel code blocks. > > Thanks to Nicolas for directions about this. > > should work with the export current file option > but does not work :-( No, this patch is about calling icalendar exporter on the agenda. I guess you are calling it on an Org buffer, which is different. Regards, --=20 Nicolas Goaziou