[Rcpp-devel] bug hunting

Dirk Eddelbuettel edd at debian.org
Tue Mar 23 20:03:25 CET 2010


On 23 March 2010 at 19:29, Romain Francois wrote:
| For future reference, I don't mind if you reindent the code to suit 
| emacs, I'm used to Dirk doing it.
| 
| Does that mean I should use "soft tabs" (emulated with spaces) ?

I got quite used to just specififying in the header:

   // -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-

which means indent by four, offset by four (whatever that does) and use
regular 8 char tabs.  Otherwise I just emacs default values -- and for R I
follow what's in one of the manuals (R Internals?)

On 23 March 2010 at 13:36, Douglas Bates wrote:
| I have C++ mode in emacs configured so that certain keystrokes indent
| lines and, for me, the indentation step is four.  I believe that
| multiple indents are expressed as tabs but I'm not sure.
| 
| In other words, my mode hook is
| (add-hook 'c++-mode-hook
| 	  (lambda () (c-set-style "bsd")
| 	    (setq c-basic-offset 4)))

That would similar to what I have, albeit with default 'scheme' as "bsd"
Do you know if the per-file ones overrule or not>
 
| If Dirk has a preferred style or offset I am happy to modify to
| whatever he sends.  He knows the intricacies of emacs better than I
| do.

Err, not even close. I understand as much Elisp as I understand Fortran. 

I think our 'non-policy policy' works so far. If we ever feel we need to
correct things, there is alsways GNU indent (and a contributor to RPostgreSQL
actually used it to standardize matters).

I did run 'M-x untabify' on all RInside examples yesterday, though, so that
users get consistent views of the indents so matter what their tabs settings.
But generally the tabs-vs-spaces war is about as useful as the vi-emacs
debate. We emacs users simply know we're right ;-)

Dirk

-- 
  Registration is open for the 2nd International conference R / Finance 2010
  See http://www.RinFinance.com for details, and see you in Chicago in April!


More information about the Rcpp-devel mailing list