Re: [Orgmode] [babel] confusion about org-confirm-babel-evaluate
Can you try setting it via setq (i.e., globally) and see what happens? On 08/12/2010 07:53 AM, 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. Thanks, eric ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] [babel] confusion about org-confirm-babel-evaluate
On Thu, 12 Aug 2010 08:44:42 -0500, Erik Iverson er...@ccbr.umn.edu wrote: Can you try setting it via setq (i.e., globally) and see what happens? On 08/12/2010 07:53 AM, 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; -*- [...] Erik, setting it globally (well, through customize as with setq didn't actually change the global value) works just fine so there must be some problem with the local value being ignored (I don't know enough about emacs variables to understand the distinction, at the level of lisp programming, between global and buffer local variables)? Of course, I'm not comfortable with the global setting for all the reasons already discussed on this list! Thanks for this, in any case, as it makes life a little less painful for today while I work on this long document! eric -- Eric S Fraga GnuPG: 8F5C 279D 3907 E14A 5C29 570D C891 93D8 FFFC F67D ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] [babel] confusion about org-confirm-babel-evaluate
Eric S Fraga ucec...@ucl.ac.uk 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 ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] [babel] confusion about org-confirm-babel-evaluate
Eric S Fraga wrote: On Thu, 12 Aug 2010 08:44:42 -0500, Erik Iverson er...@ccbr.umn.edu wrote: Can you try setting it via setq (i.e., globally) and see what happens? On 08/12/2010 07:53 AM, 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; -*- [...] Erik, setting it globally (well, through customize as with setq didn't actually change the global value) works just fine so there must be some problem with the local value being ignored (I don't know enough about emacs variables to understand the distinction, at the level of lisp programming, between global and buffer local variables)? Of course, I'm not comfortable with the global setting for all the reasons already discussed on this list! If you look at the definition of org-confirm-babel-evaluate, you'll see: ;; don't allow this variable to be changed through file settings (put 'org-confirm-babel-evaluate 'safe-local-variable (lambda (x) (eq x t))) I'll guess as to why this is. You might not want to have a malicious file essentially being able to override the very feature meant to protect the user. I could be off base with that. I'm guessing there is a solution to your problem, I just don't know it. ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] [babel] confusion about org-confirm-babel-evaluate
Nick Dokos wrote: Eric S Fraga ucec...@ucl.ac.uk 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? org-babel-confirm-evaluate is a function. org-confirm-babel-evaluate is a variable. evaluation-confirmed is the result of evaluating the org-babel-confirm-evaluate function. So even though the /result/ of that function isn't used yet, the function is still called. That function uses the value of org-confirm-babel-evaluate to decide to prompt the user or not. So, as of now, setting org-confirm-babel-evaluate to t or nil definitely has an effect. ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] [babel] confusion about org-confirm-babel-evaluate
On Thu, 12 Aug 2010 09:59:02 -0500, Erik Iverson er...@ccbr.umn.edu wrote: Eric S Fraga wrote: On Thu, 12 Aug 2010 08:44:42 -0500, Erik Iverson er...@ccbr.umn.edu wrote: Can you try setting it via setq (i.e., globally) and see what happens? On 08/12/2010 07:53 AM, 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; -*- [...] Erik, setting it globally (well, through customize as with setq didn't actually change the global value) works just fine so there must be some problem with the local value being ignored (I don't know enough about emacs variables to understand the distinction, at the level of lisp programming, between global and buffer local variables)? Of course, I'm not comfortable with the global setting for all the reasons already discussed on this list! If you look at the definition of org-confirm-babel-evaluate, you'll see: ;; don't allow this variable to be changed through file settings (put 'org-confirm-babel-evaluate 'safe-local-variable (lambda (x) (eq x t))) I'll guess as to why this is. You might not want to have a malicious file essentially being able to override the very feature meant to protect the user. I could be off base with that. I'm guessing there is a solution to your problem, I just don't know it. Ahhh... I can see the reasoning behind this but I guess the question becomes one of whether there is any way to turn this off for a file I am working on without having to turn it off globally? If not, I could turn it off globally for a while... not a big deal, I guess. Thanks! eric -- Eric S Fraga GnuPG: 8F5C 279D 3907 E14A 5C29 570D C891 93D8 FFFC F67D ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] [babel] confusion about org-confirm-babel-evaluate
Eric S Fraga wrote: On Thu, 12 Aug 2010 09:59:02 -0500, Erik Iverson er...@ccbr.umn.edu wrote: Eric S Fraga wrote: On Thu, 12 Aug 2010 08:44:42 -0500, Erik Iverson er...@ccbr.umn.edu wrote: Can you try setting it via setq (i.e., globally) and see what happens? On 08/12/2010 07:53 AM, 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; -*- [...] Erik, setting it globally (well, through customize as with setq didn't actually change the global value) works just fine so there must be some problem with the local value being ignored (I don't know enough about emacs variables to understand the distinction, at the level of lisp programming, between global and buffer local variables)? Of course, I'm not comfortable with the global setting for all the reasons already discussed on this list! If you look at the definition of org-confirm-babel-evaluate, you'll see: ;; don't allow this variable to be changed through file settings (put 'org-confirm-babel-evaluate 'safe-local-variable (lambda (x) (eq x t))) I'll guess as to why this is. You might not want to have a malicious file essentially being able to override the very feature meant to protect the user. I could be off base with that. I'm guessing there is a solution to your problem, I just don't know it. Ahhh... I can see the reasoning behind this but I guess the question becomes one of whether there is any way to turn this off for a file I am working on without having to turn it off globally? If not, I could turn it off globally for a while... not a big deal, I guess. Thanks! Also, not that it solves your issue at all, but I have (setq org-confirm-babel-evaluate nil) in my .emacs, and it sets it globally just fine... ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] [babel] confusion about org-confirm-babel-evaluate
Erik Iverson er...@ccbr.umn.edu wrote: Am I missing something? org-babel-confirm-evaluate is a function. org-confirm-babel-evaluate is a variable. I got that much, but I was expecting the return value of the function to make a difference... evaluation-confirmed is the result of evaluating the org-babel-confirm-evaluate function. So even though the /result/ of that function isn't used yet, the function is still called. That function uses the value of org-confirm-babel-evaluate to decide to prompt the user or not. So, as of now, setting org-confirm-babel-evaluate to t or nil definitely has an effect. ... but of course in this case, the function never returns in the no-confirm case. Thanks for setting me straight! Nick ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode