I think editor configuration is the responsibility of the user of the editor, and not the business of the code being edited. I'm happy if we put up some guidelines somewhere for how to configure editors (e.g. as we do now <a href="http://www.gromacs.org/Developer_Zone/Programming_Guide/Code_Formatting">http://www.gromacs.org/Developer_Zone/Programming_Guide/Code_Formatting</a>, though this will need some work still), but having yet more things in the source code to keep up to date is a pain.<br>
<br>Mark<div><br><div class="gmail_quote">On Thu, Feb 21, 2013 at 10:39 AM, Berk Hess <span dir="ltr"><<a href="mailto:hess@kth.se" target="_blank">hess@kth.se</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On 02/21/2013 10:17 AM, David van der Spoel wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On 2013-02-20 22:52, Mark Abraham wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi devs,<br>
<br>
It occurred to some of us today that we should pick a C++ coding style<br>
now before things advance too far. Berk, Teemu and Mark in<br>
<a href="http://redmine.gromacs.org/issues/845" target="_blank">http://redmine.gromacs.org/<u></u>issues/845</a> got as far as agreeing that they<br>
don't care too much about a particular style, except that it should use<br>
spacing that enhances code readability, and be readily supported in<br>
common editors (emacs, vi, Eclipse, anything else?). Ideally, without<br>
needing custom configuration of such editors.<br>
<br>
Is there anyone who already has a good reason for supporting / vetoing<br>
particular styles?<br>
<br>
Also, any remaining emacs magic lines will disappear at some point soon.<br>
<br>
Mark<br>
<br>
<br>
</blockquote>
This is indeed useful. However it would be immensely helpful to have something like emacs magic lines to help maintain a certain style. If these are to disappear, HOW will it be enforced? I noted e.g. that a lot of Teemu's code has a "non-standard" indentation where<br>
namespace gmx {<br>
<br>
does not cause indentation of the underlying code (e.g. class definitions). I don't mind this, but if such an indentation pattern can not be automated it will be difficult to keep it.<br>
<br>
</blockquote></div>
Anything can be automated in emacs.<br>
M-x c-set-style stroustrup<br>
gets things about right for C code, except that this does not match the "case" indentation of uncrustify.<br>
I would guess it should be quite close as well for C++.<br>
We can easily customize the emacs settings, and put in on the wiki, or change our standard.<br>
I don't mind have the Gromacs style default for C++ in my emacs.<br>
<br>
Cheers,<br>
<br>
Berk<div class="HOEnZb"><div class="h5"><br>
<br>
-- <br>
gmx-developers mailing list<br>
<a href="mailto:gmx-developers@gromacs.org" target="_blank">gmx-developers@gromacs.org</a><br>
<a href="http://lists.gromacs.org/mailman/listinfo/gmx-developers" target="_blank">http://lists.gromacs.org/<u></u>mailman/listinfo/gmx-<u></u>developers</a><br>
Please don't post (un)subscribe requests to the list. Use the www interface or send it to <a href="mailto:gmx-developers-request@gromacs.org" target="_blank">gmx-developers-request@<u></u>gromacs.org</a>.<br>
</div></div></blockquote></div><br></div>