Browse Source

babel doc points to code security doc and to babel security variables

Eric Schulte 14 years ago
parent
commit
b2734943ca
1 changed files with 37 additions and 14 deletions
  1. 37 14
      doc/org.texi

+ 37 - 14
doc/org.texi

@@ -11128,6 +11128,13 @@ Choose a file to tangle.
 @cindex code block, evaluating
 @cindex source code, evaluating
 
+@quotation
+Whenever code is evaluated there is a potential for that code to do harm.
+Org-mode provides a number of safeguards to ensure that it only evaluates
+code with explicit confirmation from the user.  For information on these
+safeguards (and on how to disable them) see @ref{Code evaluation security}.
+@end quotation
+
 Code blocks can be evaluated and the results placed in the Org-mode buffer.
 By default, evaluation is only turned on for @code{emacs-lisp} code blocks,
 however support exists for evaluating blocks in many languages.  See
@@ -11136,9 +11143,14 @@ code blocks} for information on the syntax used to define a code block.
 
 @kindex C-c C-c
 There are a number of ways to evaluate code blocks.  The simplest is to
-press @kbd{C-c C-c} with the point on a code block.  This will call the
-@code{org-babel-execute-src-block} function to evaluate the block and
-insert its results into the Org-mode buffer.
+press @kbd{C-c C-c} or @kbd{C-c C-v e} with the point on a code block.  This
+will call the @code{org-babel-execute-src-block} function to evaluate the
+block and insert its results into the Org-mode buffer.
+
+@quotation
+The @code{org-babel-no-eval-on-ctrl-c-ctrl-c} variable can be used to remove
+code evaluation from the @kbd{C-c C-c} key binding.
+@end quotation
 
 It is also possible to evaluate named code blocks from anywhere in an
 Org-mode buffer or an Org-mode table.  @code{#+call} (or synonymously
@@ -11212,22 +11224,33 @@ Language specific documentation is available for some languages.  If
 available, it can be found at
 @uref{http://orgmode.org/worg/org-contrib/babel/languages}.
 
+The @code{org-babel-load-languages} controls which languages are enabled for
+evaluation (by default only @code{emacs-lisp} is enabled).  This variable can
+be set using the customization interface or by adding code like the following
+to your emacs configuration.
 
-To add support for a particular language to your installation:
+@quotation
+The following disables @code{emacs-lisp} evaluation and enables evaluation of
+@code{R} code blocks.
+@end quotation
 
-@enumerate
-@item
-ensure that the language-specific requirements are met, then
-@item
-add a line to your Emacs configuration like
 @lisp
-(require 'ob-identifier)
+(org-babel-do-load-languages
+ 'org-babel-load-languages
+ '((emacs-lisp . nil)
+   (R . t)))
 @end lisp
-where ``identifier'' is taken from the table above, e.g.,
+
+It is also possible to enable support for a language by loading the related
+elisp file with @code{require}.
+
+@quotation
+The following adds support for evaluating @code{clojure} code blocks.
+@end quotation
+
 @lisp
-(require 'ob-sass)
+(require 'ob-clojure)
 @end lisp
-@end enumerate
 
 @node Header arguments, Results of evaluation, Languages, Working With Source Code
 @section Header arguments
@@ -12315,7 +12338,7 @@ Make sure you know what you are doing before customizing the variables
 which take of the default security brakes.
 
 @defopt org-confirm-babel-evaluate
-Does code evaluation have to be acknowledged by the user?
+When set to t user is queried before code block evaluation
 @end defopt
 
 @item Following @code{shell} and @code{elisp} links