[ESS] clash between setwd macro and skeleton-pair

Vitalie Spinu spinuvit.list at gmail.com
Tue Aug 9 15:48:51 CEST 2011


baptiste auguie <baptiste.auguie at googlemail.com> writes:


Hi,

You can use 'ess-use-this-dir' instead of your macro. If I understood
correctly, it does exactly what you want.

Also note that \C-c\C-s is bound by default to ess-switch-process which is
also very useful if you are  working with multiple processes.

Vitalie.


> Dear emacs gurus,
>
> Thanks to previous tips from this list I've been the .emacs file shown
> below for a while, and I'd like to get rid off an annoying clash in
> it. The first option I have set is to autocomplete matching
> parentheses etc. The last option defines a shortcut for R to setwd(
> ... where the current file actually lives ....), which I find very
> useful. Somehow this last macro is incompatible with the first,
> typically resulting in
>
> setwd("")/Users/auguieba/Documents/")"
>
> Best regards,
>
> baptiste
>
> My .emacs file contains:
>
> (setq ess-eval-visibly-p nil)
>    (setq skeleton-pair t)
>    (global-set-key (kbd "(") 'skeleton-pair-insert-maybe)
>    (global-set-key (kbd "[") 'skeleton-pair-insert-maybe)
>    (global-set-key (kbd "{") 'skeleton-pair-insert-maybe)
>    (global-set-key (kbd "\"") 'skeleton-pair-insert-maybe)
>    (global-set-key (kbd "\'") 'skeleton-pair-insert-maybe)
>    (global-set-key (kbd "\`") 'skeleton-pair-insert-maybe)
>    (global-set-key (kbd "<") 'skeleton-pair-insert-maybe)
>
> (windmove-default-keybindings)
>
> (fset 'my-setwd-macro
>       [?\C-  ?\C-u ?\M-| ?p ?w ?d return ?\C-p ?s ?e ?t ?w ?d ?\( ?\" ?\C-e ?\"
> 	     ?\)])
>
> (add-hook
>  'ess-mode-hook
>   '(lambda()
>      (define-key ess-mode-map "\C-c\C-s" 'my-setwd-macro)))
>
> ______________________________________________
> ESS-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/ess-help



More information about the ESS-help mailing list