On 2/28/07, Seth Falcon <[EMAIL PROTECTED]> wrote: > Simon Urbanek <[EMAIL PROTECTED]> writes: > > > John, > > > > On Feb 10, 2007, at 6:25 PM, John Shonder wrote: > > > >> To use R on my Mac, I had been running ESS in emacs under X11. I > >> found R.app, and much prefer it -- especially the quartz graphics > >> -- but there's one thing I miss about ESS: to get an assignment > >> arrow "<-" you just type shift underscore. In R.app, you have to > >> type the less than sign (shift-comma) followed by the dash. Coming > >> over from ESS, the extra keystroke bothers me. > >> > > > > To be honest IMHO it's one of the annoying "features" in ESS > > (configurable, though, I presume), because "_" is a valid character > > used in names, so you end up getting broken code like .Platform$r <- > > arch instead of the intended .Platform$r_arch when copy/pasting code. > > In old times it was legal to use _ instead of <-, so ESS was helping > > to make your code more legible without changing the syntax (a_10 was > > the same as a <- 10), but that is not true anymore.
This isn't really an ESS discussion but I will point out that if you want an underscore character in ESS you can get it by typing two consecutive underscores. The first one gets changed into ' <- ' and the second reverts to '_'. > I agree about the default setting in ESS being annoying. I have the > following in my .emacs: > > ;; leave my underscore key alone! > (ess-toggle-underscore nil) > (setq ess-S-assign-key [?\C-=]) > > This way, <_> is itself and <ctrl>+<=> gives <- and <=> gives =. > > + seth > > _______________________________________________ > R-SIG-Mac mailing list > [email protected] > https://stat.ethz.ch/mailman/listinfo/r-sig-mac > _______________________________________________ R-SIG-Mac mailing list [email protected] https://stat.ethz.ch/mailman/listinfo/r-sig-mac
