summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Schulte <schulte.eric@gmail.com>2010-07-02 23:41:00 -0700
committerEric Schulte <schulte.eric@gmail.com>2010-07-05 11:14:50 -0700
commitb2734943ca916178b1dde64aae344a764c035ef4 (patch)
treed75f42e0723f1f07540ff2f42cccd2609c4b8158
parent6c2e35003f72d610ae98a4d9013b04b47429131c (diff)
downloadorg-mode-b2734943ca916178b1dde64aae344a764c035ef4.tar.gz
babel doc points to code security doc and to babel security variables
-rw-r--r--doc/org.texi51
1 files changed, 37 insertions, 14 deletions
diff --git a/doc/org.texi b/doc/org.texi
index eb91152..8a0eca9 100644
--- a/doc/org.texi
+++ b/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