User manual

Chapter 10: Developing with ESS 54
In order to use ess-developer you must add names of the packages that you are developing
to ess-developer-packages. You can also do that interactively with C-c C-t C-a. To
remove packages from ess-developer-packages use C-c C-t C-r. When developer mode
is on, the process mode line indicator displays a small or capital letter "d".
If variable ess-developer-activate-in-package is t (the default) R-mode will check
after visiting the file whether or not the file is part of the package. If visited file is part of
a package listed in ess-developer-packages, developer mode is activated automatically.
Developer mode is usually activated on per-file basis and a small "d" appears in the
modeline. You can also activate ess-developer for all buffers connected to current process.
This is done by toggling ess-developer in subprocess buffer. In this case a big "D" will
appear in the modeline.
[Command]ess-developer val
C-c C-t C-t Toggle developer mode on and off. If called from script buffer, toggle
developer on file-by-file basis. When called from process buffer, toggle developer on
per-process basis.
[Command]ess-developer-add-package from-attached remove
C-c C-t C-a Add a package to your development list (ess-developer-packages).
[Command]ess-developer-remove-package
C-c C-t C-r Remove a package from your development list.
When you add a package to ess-developer-packages, ESS will ask for loading com-
mand. By default there are two options library and load_all from devtools package.
You can configure this behavior in ess-developer-load-on-add-commands. To explisitely
load the package containing current file use C-c C-t l.
[Command]ess-developer-load-package
C-c C-t l Load package with load_all utility from devtools package.
When developer mode is on, ESS evaluation commands behave differently:
C-c C-l (ess-load-file) asks for the package to source into and inserts all redefined
objects into the package:foo or namespace:foo accordingly.
PLAIN OBJECTS and FUNCTIONS:
If the object is found in an environment (package:foo or namespace:foo), and differs
from the old one it is assigned into the corresponding environment. If the object
is not found it is assigned into .GlobalEnv. The environment of functions is set to
namespace:foo.
CLASSES:
Same as plain objects, with the difference that even if the class definition is assigned
into .GlobalEnv, it is still associated with the package foo. Thus if you issue
getClassDeff("foo") you will get a class definition with the slot @package pointing
to package "foo".
Note: Occasionally, after adding new classes you might get warnings from
"setClass". This is especially true if new class inherits or is inherited by a class
whose definition is not exported. You might get something like: Warning: