From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: [babel] confusion about org-confirm-babel-evaluate Date: Thu, 12 Aug 2010 10:15:43 -0400 Message-ID: <13118.1281622543@gamaville.dokosmarshall.org> References: <87r5i4ng9m.wl%ucecesf@ucl.ac.uk> Reply-To: nicholas.dokos@hp.com Return-path: Received: from [140.186.70.92] (port=41832 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OjYZj-0005lK-3b for emacs-orgmode@gnu.org; Thu, 12 Aug 2010 10:16:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OjYZh-0001z3-Jp for emacs-orgmode@gnu.org; Thu, 12 Aug 2010 10:16:07 -0400 Received: from vms173015pub.verizon.net ([206.46.173.15]:38400) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OjYZh-0001ye-BB for emacs-orgmode@gnu.org; Thu, 12 Aug 2010 10:16:05 -0400 Received: from gamaville.dokosmarshall.org ([unknown] [12.198.177.3]) by vms173015.mailsrvcs.net (Sun Java(tm) System Messaging Server 7u2-7.02 32bit (built Apr 16 2009)) with ESMTPA id <0L71005UIMA76T10@vms173015.mailsrvcs.net> for emacs-orgmode@gnu.org; Thu, 12 Aug 2010 09:15:48 -0500 (CDT) In-reply-to: Message from Eric S Fraga of "Thu, 12 Aug 2010 13:53:57 BST." <87r5i4ng9m.wl%ucecesf@ucl.ac.uk> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Eric S Fraga Cc: nicholas.dokos@hp.com, org-mode mailing list Eric S Fraga wrote: > Hello all, > > Back from a short holiday and trying to catch up on work... and so I > may have missed something in the org mailing list (although I've > searched...). > > I have a large file which includes many babel code blocks (mostly > maxima) that I wish to have evaluated on export. This works except > that I have to confirm each evaluation (which takes some time). I > know that org-confirm-babel-evaluate exists so I have put the > following at the top of my org file: > > # -*- org-confirm-babel-evaluate: nil; -*- > > checking the value of this variable (C-h v org-babel-confirm-evaluate) > gives me: > > ,---- > | org-confirm-babel-evaluate is a variable defined in `ob.el'. > | Its value is nil > | Local in buffer deferred-questions.org; global value is t > | > | This variable is a file local variable. > | This variable is safe as a file local variable if its value > | satisfies the predicate which is byte-compiled expression. > | > | Documentation: > | Confirm before evaluation. > | Require confirmation before interactively evaluating code > | blocks in Org-mode buffers. The default value of this variable > | is t, meaning confirmation is required for any code block > | evaluation. This variable can be set to nil to inhibit any > | future confirmation requests. This variable can also be set to a > | [...] > `---- > > so the value is indeed nil. However, exporting to PDF, say, still > requires me to confirm each evaluation. Typing C-c C-c doesn't > require confirmation, however, so the variable does seem to have some > effect. > > What am I missing here to avoid having to confirm on export? The only > variable I have found that combines both export and babel is > org-export-babel-evaluate which is not what I want. > Seems to me that the variable is not effective at all at this point in time: it still has to be connected up and wired in. Here's what I see: Org-mode version 7.01trans (release_7.01h.112.g13a0) GNU Emacs 24.0.50.1 (i686-pc-linux-gnu, GTK+ Version 2.14.4) of 2010-05-17 on gamaville.dokosmarshall.org org-babel-execute-src-block calls org-babel-confirm-evaluate in the following context: (let (... (evaluation-confirmed (org-babel-confirm-evaluate info)) ...) ... but evaluation-confirmed is not used anywhere. In fact, there is a comment on the line above: ;; note the `evaluation-confirmed' variable is currently not ;; used, but could be used later to avoid the need for ;; chaining confirmations (evaluation-confirmed (org-babel-confirm-evaluate info)) but that's the *only* place where org-babel-confirm-evaluate is called, so I don't think the function (or the variable that Eric is trying to set) has any effect at all. I haven't chased things through to the C-c C-c stage that Eric mentions, so I'm not sure what causes that. Am I missing something? Thanks, Nick