User manual
Chapter 7: Editing objects and functions 41
wanted to look at the definition of one of the standard S functions) the source dump file
won’t be left around when you kill the buffer. Note that this variable only applies to files
generated with S’s dump function; it doesn’t apply to source files which already exist. The
default value is t.
[User Option]ess-keep-dump-files
Variable controlling whether to delete dump files after a successful load. If ‘nil’:
always delete. If ‘ask’, confirm to delete. If ‘check’, confirm to delete, except for
files created with ess-dump-object-into-edit-buffer. Anything else, never delete.
This variable only affects the behaviour of ess-load-file. Dump files are never
deleted if an error occurs during the load.
After an object has been successfully (i.e. without error) loaded back into S with C-c
C-l, the disk file again corresponds exactly (well, almost — see below) to S’s record of the
object’s definition, and so some people prefer to delete the disk file rather than unnecessarily
use up space. This option allows you to do just that.
If the value of ess-keep-dump-files is t, dump files are never deleted after they are
loaded. Thus you can maintain a complete text record of the functions you have edited
within ESS. Backup files are kept as usual, and so by using the Emacs numbered backup
facility — see Section “Single or Numbered Backups” in The Gnu Emacs Reference Manual,
you can keep a historic record of function definitions. Another possibility is to maintain
the files with a version-control system such as RCS See Section “Version Control” in The
Gnu Emacs Reference Manual. As long as a dump file exists in the appropriate place
for a particular object, editing that object with C-c C-e C-d finds that file for editing
(unless a prefix argument is given) — the ESS process is not consulted. Thus you can
keep comments outside the function definition as a means of documentation that does not
clutter the S object itself. Another useful feature is that you may format the code in any
fashion you please without S re-indenting the code every time you edit it. These features
are particularly useful for project-based work.
If the value of ess-keep-dump-files is nil, the dump file is always silently deleted after
a successful load with C-c C-l. While this is useful for files that were created with C-c C-e
C-d it also applies to any other file you load (say, a source file of function definitions), and
so can be dangerous to use unless you are careful. Note that since ess-keep-dump-files
is buffer-local, you can make sure particular files are not deleted by setting it to t in the
Local Variables section of the file See Section “Local Variables in Files” in The Gnu Emacs
Reference Manual.
A safer option is to set ess-keep-dump-files to ask; this means that ESS will always
ask for confirmation before deleting the file. Since this can get annoying if you always want
to delete dump files created with C-c C-e C-d, but not any other files, setting ess-keep-
dump-files to check (the default value) will silently delete dump files created with C-c
C-e C-d in the current Emacs session, but query for any other file. Note that in any case
you will only be asked for confirmation once per file, and your answer is remembered for
the rest of the Emacs session.
Note that in all cases, if an error (such as a syntax error) is detected while loading the
file with C-c C-l, the dump file is never deleted. This is so that you can edit the file in a
new Emacs session if you happen to quit Emacs before correcting the error.
Dump buffers are always autosaved, regardless of the value of ess-keep-dump-files.










