Well, the kernel devs try to remove trailing whitespace where it is found (and while in the process of doing something more meaningful) [1] and avoid introducing it in the first place at all [2] but do not create patchbombs by going out of their way to do so. I mean, this just makes sense anyway.
As far as I know, the general attitude among developers is that trailing whitespace is always bad (a Google search for "trailing whitespace" will return rants about it by the dozens as well as plenty of tips on how to get rid of it using various editors, VCS tools, etc.), but removing existing trailing whitespace is not worth creating extraneous chunks in patches/diffs. And I agree with that, just to make it clear to for example Florent above :) As I mentioned in the OP, git used to by default refuse to let you commit changes that introduced new trailing space, but of course didn't complain when you left alone trailing space that was already there. We could probably do a similar thing by hooking into trac and not allowing uploads of patches that introduce trailing whitespace. But this may not be agreeable to Jason or others who like to put trailing space on otherwise empty lines. Would it be possible to configure emacs to pretend there is space there, or something like that? I imagine it should be easy to add something to ~/.emacs which upon loading a .py or .pyx file searches for blocks of empty lines, checks previous and following lines' indentation, and if it's the same both above and below, apply the same indentation to all the empty lines in between. Then another hook would, upon save-to-disk, just delete all trailing whitespace again. This would transparently make the cursor movement nicer within the open buffer for people who like it that way. Jason, what do you think? (I CC'd Jason). By the way, there is also a third-party Mercurial extension which bugs you when you try to commit (or qnew/qrefresh, I imagine) trailing whitespace. We could... ship this with the built-in Mercurial, for what it's worth, but I think the above solution (hooking into trac) is better. Again, sorry for wasting your time with such a trivial matter. I didn't expect the thread to grow so huge! :) -Keshav [1] http://www.mail-archive.com/linux-kernel%40vger.kernel.org/msg208985.html [2] http://www.kernel.org/doc/Documentation/CodingStyle [3] http://mercurial.selenic.com/wiki/CheckFilesExtension ---- Join us in #sagemath on irc.freenode.net ! -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org