[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ess-help
Subject:    Re: [ESS] Easy argument list: r-autoyas
From:       ottorino <ottorino-luca.pantani () unifi ! it>
Date:       2011-03-21 14:08:32
Message-ID: 1300716512.21160.17.camel () ottorino-amd
[Download RAW message or body]

Il giorno dom, 20/03/2011 alle 12.23 +0100, Vitalie Spinu ha scritto:
> If you want the expansion to work immediately after 'plot' with my
> code,
> use:
> 
> (define-key ess-mode-map (kbd "C-M-<tab>") '(lambda () (interactive)
>                                               (insert "(")
>                                               (r-autoyas-expand)))
> 
> I have in mind to implement an automatic autoyas detection of existing
> arguments. Say, you already have plot(xxx, yyy, col="red") in you
> buffer. You call the r-autoyas-expand inside (...) and xxx, yyy are
> recognized correctly as x and y arguments of plot, col="red" is left
> untouched and all other arguments (except x, y and col) are proposed
> for
> completion.
> 
> In order for the this idea to work r-autoyas should work only after
> "(".
> 

Hi all,
I'm quite ignorant in Lisp, but I find very convenient to bind the
expand to

ctrl shift "("

I've bound r-autoyas-expand with the following line in my .emacs

(define-key ess-mode-map [67108904] 'r-autoyas-expand )

Is there any simpler way to express 
ctrl shift "("
than the mysterious "67108904" number ?


I've found this number by
M-x global-set-key 
press the sequence
then
 C-x ESC ESC

to see the results 


It is described here

http://www.nongnu.org/emacs-tiny-tools/keybindings/

Unfortunately the "key-description", also described there,
do not work on my system.

Ottorino

______________________________________________
ESS-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/ess-help
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic