[ESS] Updating Emacs working directory after issuing an R setwd()

Charles C. Berry cberry at tajo.ucsd.edu
Sat May 23 22:13:03 CEST 2009


On Fri, 22 May 2009, Blanchette, Marco wrote:

> Dear list,
>
> Is there a way to reset the emacs working directory of the ESS buffer after using setwd() in an R session?

M-x cd RET <newdir> RET

> Could this be automated following a setwd() call?

If you mean _immediately_ after the setwd() command, you can do something 
like
 	M-x ess-execute RET cat(.Last.value,sep='') RET

kill it, return to the process buffer, then

 	M-x cd RET C-y RET

You can turn that into a macro and assign it to a key in your .emacs

HTH,

Chuck

>
> Thanks
>
> Marco
> --
> Marco Blanchette, Ph.D.
> Assistant Investigator
> Stowers Institute for Medical Research
> 1000 East 50th St.
>
> Kansas City, MO 64110
>
> Tel: 816-926-4071
> Cell: 816-726-8419
> Fax: 816-926-2018
>
> ______________________________________________
> ESS-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/ess-help
>

Charles C. Berry                            (858) 534-2098
                                             Dept of Family/Preventive Medicine
E mailto:cberry at tajo.ucsd.edu	            UC San Diego
http://famprevmed.ucsd.edu/faculty/cberry/  La Jolla, San Diego 92093-0901



More information about the ESS-help mailing list