[ESS] setwd shortcut

baptiste auguie bapt4510 at googlemail.com
Sat Jul 3 22:40:12 CEST 2010

It's an idea, but I often have several R files open in a given
session, and they do not necessarily share the same working directory.

Thanks though,


On Sat, Jul 3, 2010 at 7:51 PM, Gustavo Lacerda <guse at optimizelife.com> wrote:
> you can add to your .emacs:
> (dired "myproject")
> If you start R from there, it prompts you with "starting data directory?",
> with the default value being the directory of the current emacs buffer.
> (This has been tested successfully on Win XP and Kubuntu 10.04)
> Gustavo
> --
> Gustavo Lacerda
> http://www.optimizelife.com
> On Sat, Jul 3, 2010 at 9:38 AM, baptiste auguie <bapt4510 at googlemail.com>
> wrote:
>> Dear ESS gurus,
>> Quite often the first line of my R source code is to set the working
>> directory where the source file resides. On a Mac, to find the
>> filepath, I usually open a Terminal window and drag a folder from the
>> Finder. I then copy this path and paste it in the setwd("") command in
>> aquamacs. It's quite a convoluted process, a waste of time and focus.
>> I suddenly realized that it should be possible to do it within emacs
>> alone --- some magic C-c C-??? command that would return the filepath
>> of the buffer wrapped inside setwd("").
>> Any tips?
>> Regards,
>> baptiste
>> ______________________________________________
>> ESS-help at stat.math.ethz.ch mailing list
>> https://stat.ethz.ch/mailman/listinfo/ess-help

More information about the ESS-help mailing list