[ESS] R is restoring "previously saved workspace" without me asking it to

tyler tyler.smith at mail.mcgill.ca
Wed Jun 18 22:36:12 CEST 2008

"Mark Kimpel" <mwkimpel at gmail.com> writes:

> I have the following in my .Rprofile to get rid of other pesky files
> that seem to creep into my directories. I realize that occasionally
> these can be useful, such as to restore a crashed Emacs session, but
> most of the time they just annoy the heck out of me when I am looking
> for something. I'm betting there are some more good suggestions out
> there, don't let me down! Mark
> setwd("~/myRdirectory")
> system("find ./ -name #*# -print | xargs rm")
> system("find ./ -name .#*# -print | xargs rm")
> system("find ./ -name .#* -print | xargs rm")

You can tell emacs not to auto-save files by including something along
the lines of this in your .emacs:

(setq auto-save-default nil)

See the Emacs manual: 23.6.2 Controlling Auto-Saving

> system("find ./ -name '.Rhistory' -print | xargs rm")

Maybe something in .Rprofile will cancel saving to .Rhistory? I couldn't
find anything.

> system("find ./ -name '.*tmp' -print | xargs rm")

I'm not sure why you'd have these.

> system("find ./ -name *~ -print | xargs rm")
> system("find ./ -name .*~ -print | xargs rm")

(setq make-backup-files nil)

See the Emacs manual: 23.3.2 Backup Files

Note that any file that starts with a '.' should be invisible under
normal circumstances, at least on Unix/Linux. If you're using MSWindows
maybe you can ask your file-browser to not "show hidden files"? That way
you still have the benefit of all those "dot" files without having to
sift through them all the time.



(who's holding his tongue - you *really* don't want to have
auto-save/backup files??)

The purpose of models is not to fit the data but to sharpen the questions.
                                       --Samuel Karlin

More information about the ESS-help mailing list