Re: [Orgmode] File-level execute permissions?
Bill Harris bill_har...@facilitatedsystems.com writes: Eric Schulte schulte.e...@gmail.com writes: [...] Note: the above requires that you pull down the latest version of Org-mode. I've got 7.01h. I presume you mean something newer than that? Yes, you'll need to pull a copy of Org-mode from the git repository, anything pulled after the date of my last message will work. git clone git://repo.or.cz/org-mode.git For information on git see http://git-scm.com/ Best -- Eric Bill ___ 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] File-level execute permissions?
Eric Schulte schulte.e...@gmail.com writes: Yes, you'll need to pull a copy of Org-mode from the git repository, anything pulled after the date of my last message will work. Eric, Thanks, Bill -- Bill Harris http://makingsense.facilitatedsystems.com/ Facilitated Systems Everett, WA 98208 USA http://www.facilitatedsystems.com/ phone: +1 425 374-1845 ___ 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] File-level execute permissions?
Hi Bill, The `org-confirm-babel-evaluate' variable can be set to a function which can query the user to confirm code block evaluation. The following code does two things. 1) it creates and maintains a list of the files that the user has said are safe for evaluation (this list will need to be rebuilt every time you re-start Emacs) 2) it shows the language and body of the code block to the user when querying for evaluation --8---cut here---start-8--- (setq babel-safe-files '()) (defun my-babel-confirmation (lang body) (let ((file (buffer-file-name))) (if (member file babel-safe-files) nil (if (y-or-n-p (format (concat #+begin_src %s\n%s#+end_src\n Evaluate this code block (and all others in this file) on your system? ) lang body)) (prog1 nil (setq babel-safe-files (cons file babel-safe-files))) t (setq org-confirm-babel-evaluate #'my-babel-confirmation) --8---cut here---end---8--- This above can be added to your configuration to get close to the functionality you describe. I agree that the default confirmation should show the code block in question when asking if it should be evaluated. I'll add this to our development task list. Note: the above requires that you pull down the latest version of Org-mode. Best -- Eric Bill Harris bill_har...@facilitatedsystems.com writes: Noorul Islam noo...@noorul.com writes: How about setting `org-confirm-babel-evaluate' to nil Noorul, Thank you for the suggestion. Setting that to nil, according to the documentation, prevents _any_ confirmation requests in any file, at least as best as I can tell. I don't really want that. What I want is to have to confirm once at the first code block in an org file and then have the rest go without confirmation. Since I don't see the code blocks anyway when I get asked for confirmation, I'm not sure there's a lot of benefit to a confirmation request on each block, but I do want a reminder that there is one or more code blocks in a file before I blithely execute the entire thing. Bill ___ 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] File-level execute permissions?
Eric Schulte schulte.e...@gmail.com writes: The `org-confirm-babel-evaluate' variable can be set to a function which can query the user to confirm code block evaluation. The following code does two things. 1) it creates and maintains a list of the files that the user has said are safe for evaluation (this list will need to be rebuilt every time you re-start Emacs) 2) it shows the language and body of the code block to the user when querying for evaluation Eric, That sounds like what I was seeking. Thanks! Note: the above requires that you pull down the latest version of Org-mode. I've got 7.01h. I presume you mean something newer than that? Bill -- Bill Harris http://makingsense.facilitatedsystems.com/ Facilitated Systems Everett, WA 98208 USA http://www.facilitatedsystems.com/ phone: +1 425 374-1845 ___ 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] File-level execute permissions?
Noorul Islam noo...@noorul.com writes: How about setting `org-confirm-babel-evaluate' to nil Noorul, Thank you for the suggestion. Setting that to nil, according to the documentation, prevents _any_ confirmation requests in any file, at least as best as I can tell. I don't really want that. What I want is to have to confirm once at the first code block in an org file and then have the rest go without confirmation. Since I don't see the code blocks anyway when I get asked for confirmation, I'm not sure there's a lot of benefit to a confirmation request on each block, but I do want a reminder that there is one or more code blocks in a file before I blithely execute the entire thing. Bill -- Bill Harris http://makingsense.facilitatedsystems.com/ Facilitated Systems Everett, WA 98208 USA http://www.facilitatedsystems.com/ phone: +1 425 374-1845 ___ 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
[Orgmode] File-level execute permissions?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I understand at least the obvious risks in executing source code blocks inside an unknown org file, but, when I created the org file myself, it would be nice to be able to export the file without confirming execution 20+ times. Is there a header element I can set that asks one time for the entire file (or session, perhaps) for execute permission? I think that would be safer than blindly turning on permission, for I'd at least get one opportunity to abort exporting if I was surprised by the existence of src blocks. Thanks, Bill - -- Bill Harris http://makingsense.facilitatedsystems.com/ Facilitated Systems Everett, WA 98208 USA http://www.facilitatedsystems.com/ phone: +1 425 374-1845 -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (GNU/Linux) iEYEARECAAYFAkyco4sACgkQ3J3HaQTDvd/80wCfQgv/OSZ7XbH6U2c3F9TbRiMw G4UAnRSDTxpprkuBhpBRukq9+Qxj3Mmm =lmZG -END PGP SIGNATURE- ___ 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] File-level execute permissions?
On Fri, Sep 24, 2010 at 6:41 PM, Bill Harris bill_har...@facilitatedsystems.com wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I understand at least the obvious risks in executing source code blocks inside an unknown org file, but, when I created the org file myself, it would be nice to be able to export the file without confirming execution 20+ times. Is there a header element I can set that asks one time for the entire file (or session, perhaps) for execute permission? I think that would be safer than blindly turning on permission, for I'd at least get one opportunity to abort exporting if I was surprised by the existence of src blocks. How about setting `org-confirm-babel-evaluate' to nil Thanks and Regards Noorul ___ 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