[ESS] First steps

Marc Schwartz marc_schwartz at me.com
Fri Jun 26 16:24:56 CEST 2009


On Jun 26, 2009, at 9:09 AM, Marc Schwartz wrote:

> On Jun 26, 2009, at 7:16 AM, baptiste auguie wrote:
>
>> Dear list,
>>
>> I apologize for the really basic questions, but I'm completely new to
>> emacs. I used to use Textmate with R.app on a Mac, but I'd like to
>> switch to aquamacs now. I've installed this version,
>>
>> GNU Emacs 22.3.1 (i386-apple-darwin9.6.0, Carbon Version 1.6.0)
>> of 2009-02-18 on plume.sr.unh.edu - Aquamacs Distribution 1.7
>>
>> ESS version 5.3.6
>>
>>
>> The minor annoyances I'm facing are the following,
>>
>> i) how do you type the assignment operator <- more efficiently than
>> with the 4 keystrokes I just used? (space on both sides)
>
> Type an underscore character.
>
> If you actually want an underscore, type it twice
>
>
>> ii) with a comma-separated list (e.g. seq( 1, 3, by=0.1) is there a
>> way to get automatic spacing after the commas whilst typing?
>
> I have the following in my .emacs:
>
> (defun ess-comma-space ()
>  (global-set-key (kbd ",") (lambda () (interactive) (insert ", "))))
>
> (add-hook 'ess-mode-hook 'ess-comma-space)
> (add-hook 'inferior-ess-mode-hook 'ess-comma-space)

Correction....that should be:

(defun ess-comma-space ()
   (local-set-key (kbd ",") (lambda () (interactive) (insert ", "))))

...

Note the 'global-set-key' that I had should be 'local-set-key'.  I had  
played around with the code previously and presently have it commented  
out, so that at the moment it is non-functional.

Marc



More information about the ESS-help mailing list