[ESS-bugs] ess-r-args-auto-show: amend doc string

David Reitter david.reitter at gmail.com
Wed Apr 29 18:24:08 CEST 2009


Running M-xess-r-args-auto-show inserts unwanted characters into my  
buffer.  For instance when calling it with point in between the parens  
here:

quartz()

in an R-mode buffer, it inserts ^M.

I've been trying to use it as such:

(run-with-idle-timer 0.2 t
		     (lambda ()
		       (when (eq major-mode 'ess-mode)
			 (ess-r-args-auto-show))))

and now it seems to insert tabs into the buffer, whether it finds a  
function or not.  Other garbage is inserted as well - it is not  
limited to tabs.

A little investigation shows that the bug seems to be in `skeleton- 
pair-insert-maybe'.
This is an interactive function that essentially looks at the last key  
event and inserts it into the buffer.

Thus, binding ess-r-args-auto-show to '(' or so will result in the  
right action, but doing anything else with the function will be  
confusing.

I suggest to either insert an appropriate check to the function to  
make it more flexible, or amend the doc string:

"Must be bound to a keyboard event that normally inserts a character  
into the buffer."


(For now, I'm using ess-r-args-show instead.)


Also, this doc string:

(ess-r-args-show &optional function)

Show arguments and their default values of R function. Calls
M-x ess-r-args-current-function if called without argument.

seems a bit wonky, given that ess-r-args-current-function is not  
interactive and can't be called with M-x.




PS.: cc me in replies please.



More information about the ESS-bugs mailing list