[ESS] Melpa got me now. What you say about ess-smart-underscore ?

Martin Maechler m@ech|er @end|ng |rom @t@t@m@th@ethz@ch
Sat Apr 4 09:18:06 CEST 2015


On Sat, Apr 4, 2015 at 5:00 AM, Paul Johnson <pauljohn32 using gmail.com> wrote:
>
> I finally got Melpa to work. I've tried a lot of packages in the last 2 days :)
>
> I found ess-smart-underscore and I think I like it.  I think I wish
> you'd put it into ESS itself.  Have you thought about it?

I don't understand  ess-smart-underscore is a function part of ESS.
What do you mean exactly?
Are you just proposing to change the *default* behavior?

>From reading further, I guess you would want to turn off the smart
underscore behavior.
You can do this in several ways (via emacs customization),
and also via
   M-x ess-toggle-S-assign
which is equivalent to  M-x ess-toggle-underscore.
Notably you (or your students) could add

    (ess-toggle-underscore)

in your ~/.emacs.
Then you can still  use   M--  (Meta / Alt key  plus "-")  to get " <- ".

I've slightly more modularized the elisp code for setting / unsetting
this behavior - in the ESS development sources on github.
I'm not yet entirely happy with the new function name I chose, so am
not advertizing it yet..

Martin

>
> Without smart underscore, I still get a lot of accidental <- when I want _.
>
> I watch the students in the lab here learning to use ESS/Emacs and the
> two most frustrating keyboard things for them are 1) the arrow keys
> don't work the way the expect and 2) variables with underscores in
> them are very difficult to type.
>
> To anticipate one counter argument, changing the behavior of _ will
> inconvenience the people who have gotten used to the double _.
> However, remember that the underscore was a forbidden character (was
> assignment in S) and most of us who are really old still get a
> creepy-crawley feeling when we see underscores in variable and
> function names.  So, if you install smart underscore, you reduce the
> discomfort by 1/2 by reducing the number of times they have to type
> underscore.
>
> pj
> --
> Paul E. Johnson
> Professor, Political Science        Director
> 1541 Lilac Lane, Room 504      Center for Research Methods
> University of Kansas                  University of Kansas
> http://pj.freefaculty.org               http://crmda.ku.edu
>
> ______________________________________________
> ESS-help using r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/ess-help
>




More information about the ESS-help mailing list