[ESS] ess-eldoc and insert-parentheses

Stephen Eglen S.J.Eglen at damtp.cam.ac.uk
Sun Dec 23 13:53:21 CET 2007

 > However, I always avoid typing single braces to reduce brace matching
 > problems and use insert-parentheses, which is bound to "M-(". Unfortunately
 > this destroys the online syntax help provided by ess-eldoc, because
 > the command inserts a space before the opening brace
 > ("plot ()" instead of the required "plot()")
 > and the minibuffer is empty when I'm inside the brace pair.

Yes, this seems to be the default behaviour from insert-parentheses;
however, there is a variable mentioned in its doc string that controls
whether space is inserted; if you do:

(setq parens-require-spaces nil)

[I'm slightly suprised the default for that variable is t]

M-( now does not put space in.

 > Is it possible to retain the space between the function name and the
 > opening brace
 > (which enhances readability of the code) and benefit from ess-eldoc at
 > the same time?

It might be possible to change the regexp used by ess-eldoc that
recognises functions, but if the above works, then perhaps that could
be the fix for now.

 > thank you very much in advance,
 > and merry Christmas :-)

Likewise, happy christmas and new year to all ESS'ers!


More information about the ESS-help mailing list