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@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@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/ess-help
>

	[[alternative HTML version deleted]]

