[ESS] setwd shortcut
Charles C. Berry
cberry at tajo.ucsd.edu
Sat Jul 3 21:43:43 CEST 2010
On Sat, 3 Jul 2010, baptiste auguie 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?
Save a keyboard macro?
(setq last-kbd-macro
[?\C- ?\C-u ?\M-| ?p ?w ?d return ?\C-p ?s ?e ?t ?w ?d ?\( ?\" ?\C-e ?\" ?\)])
HTH,
Chuck
>
> Regards,
>
> baptiste
>
> ______________________________________________
> 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