[ESS] Easy argument list: r-autoyas

Sven Hartenstein lists at svenhartenstein.de
Thu Mar 10 21:48:36 CET 2011


Hi Ottorino,

> It looks like what I've been dreaming for years !!!
> But unfortunately seems not to work on my system.
> [...]
> On opening emacs I can get the YASnippets menu, but I cannot when an
> .R file is displayed on the buffer.

For the yas mode to be active, it seems like at least one snippet must
be defined for ESS mode.

Thus, if you have e.g.

  (setq yas/root-directory "~/.emacs.d/mysnippets")

in your ~/.emacs, then create a directory
~/.emacs.d/mysnippets/ess-mode/ and place a snippet inside, e.g. a
file called "for.yasnippet" with content

  # -*- mode: snippet -*-
  # name: for ( ... in ...) { ... }
  # key: for
  # contributor: jrnold <jeffrey.arnold at gmail.com>
  # --
  for (${1:i} in ${2:vector}) {
      $0
  }

Does it help? I mean, do you now, after restarting emacs, have the yas
menu in ESS mode now? If so, I hope r-autoyas will work too. Does it?

> P.zle Cascine 28 50144 Firenze Italia

Ah, Firenze - what a beautiful city! :-)

Best,

Sven



More information about the ESS-help mailing list