[ESS] ESS with inline package (for R) and indenting C/C++ code

Ramon Diaz-Uriarte rdiaz02 at gmail.com
Fri Nov 2 15:55:27 CET 2012


Dear All,

I am using the inline package for R, and I'd like indentation to magically
work on C/C++ code fragments. 

For example, if I type by hand the following fragment (from question 2.2
in the Rccp-FAQ.Rnw file, by Eddelbuettel and François)


fx <- cxxfunction(signature( x = "numeric" ),
    'NumericVector xx(x);
     return wrap( std::accumulate( xx.begin(), xx.end(), 0.0));',
    plugin = "Rcpp")


the body of the C++ code itself is not indented automagically, and when
typing the second line, I am taken to column 0 (and tab will do
nothing). Is it possible to avoid having to manually enter whitespace?


Thanks,

R.

P.S. In case it matters, I am using ESS version 12.09-1, as available from
Debian, and GNU Emacs 24.2.50.1 (x86_64-pc-linux-gnu, GTK+ Version 3.4.2)
of 2012-10-18 on dex, modified by Debian. 

-- 
Ramon Diaz-Uriarte
Department of Biochemistry, Lab B-25
Facultad de Medicina 
Universidad Autónoma de Madrid 
Arzobispo Morcillo, 4
28029 Madrid
Spain

Phone: +34-91-497-2412

Email: rdiaz02 at gmail.com
       ramon.diaz at iib.uam.es

http://ligarto.org/rdiaz



More information about the ESS-help mailing list