Go to the first, previous, next, last section, table of contents.
ESS can be easily customized to your taste simply by including the appropriate lines in your `.emacs' file. There are numerous variables which affect the behavior of ESS in certain situations which can be modified to your liking. Keybindings may be set or changed to your preferences, and for per-buffer customizations hooks are also available.
ESS is easily customizable by means of setting variables in your `.emacs' file. In most cases, you can change defaults by including lines of the form
(setq variable-name value)
in your `.emacs'.
In what follows, variable names will be listed along with their descriptions and default values. Just substitute the variable name and the new value into the template above.
t
nil
value, then every time ESS is
run with M-x S
you will be prompted for a directory to use as the working directory for
your S session; this directory should have a `.Data'
subdirectory.
If the value of ess-ask-for-ess-directory
is nil
, the
value of S-directory
is used as the working directory.
ess-ask-for-ess-directory
is nil
, and the
default when prompting for a directory if it is not. For example, you
may wish to set this to the value of the current buffer's working
directory before starting S by adding the following line to your
`.emacs' file (See section Customizing ESS with hooks)
(setq ess-pre-run-hook '((lambda () (setq S-directory default-directory))))
nil
nil
value, then every time ESS is
run with M-x S
you will be asked for a value for the DISPLAY
environment
variable
to be used in the current S session. If this variable is not set
correctly, S will not be able to create any windows under the X
windowing environment.
Completion is provided over the X-displays-list
variable; the
default is the current value of DISPLAY
. This feature is useful
is you often run S on a different display than that of the machine you
are running S from. If
ess-ask-about-display
is nil
, the current value of
DISPLAY
is used.
'(":0.0")
DISPLAY
environment variable,
provided for completion when prompting for such a value.
t
nil
value, then
dumping a non-existent object will result in the edit buffer containing
a skeleton function definition, ready for editing.
"/tmp/"
nil
.
object_name.S
nil
t
nil
, then TAB in the edit buffer always indents the
current line, regardless of the position of point in the line.
Otherwise, indentation is only performed if point is in the lines
indentation, and a tab character is inserted is point is after the first
nonblank character.
nil
nil
means automatically newline before and after braces
inserted in S code.
The following variables control amounts of indentation. These variables automatically become buffer-local in any ESS buffer, and so setting any of these variables has effect in the current buffer only.
ess-continued-statement-offset
.
foo
when it is called as
the value of an argument to another function in
arg=foo(...)
form. If not number, the statements are indented at
open-parenthesis following foo
.
expression()
specified in
obj <- expression(...)
form. If not a number, the statements are indented at open-parenthesis following `expression'.
else
clause with respect to the
corresponding if
.
In addition, a number of default styles are defined for you (in
ess-style-alist
):
DEFAULT
nil
nil
, then the ess-execute-
commands (see section Other commands provided by inferior-ESS)
output to a temporary buffer. Otherwise, the
output goes to the ESS process.
nil
nil
, then the ess-eval-
commands (see section Creating or modifying S objects) echo the S commands in the process buffer by default. In any
case, passing a prefix argument to the eval command reverses the meaning
of this variable.
ESS provides the following hooks:
ESS
is run.
ess-eval-visibly
, say.
ESS provides a separate keymaps (keymap variables) for ESS process buffers, edit buffers and for help buffers. The key bindings in the edit buffers further depend on the language and dialect in use.
comint-mode-map
are automatically inherited.
ess-help-sec-map
is the keymap for the `s' prefix key. Keys defined in
ess-help-sec-keys-alist
are automatically inserted into this
keymap
when ESS is loaded.
Go to the first, previous, next, last section, table of contents.