[darcs-users] trailing whitespace
Trent W. Buck
trentbuck at gmail.com
Wed May 13 04:06:15 UTC 2009
Eric Kow <kowey at darcs.net> writes:
> One reason is that we want to avoid creating diffs in which the only
> thing that has changed is the whitespace. A way to achieve this would
> be to have no trailing whitespace whatsoever and then systematically
> zap any whitespace that enters. It doesn't mean we have to reject
> patches with trailing whitespace, either, although we could always
> make a remark on this fact to minimise zappage.
This would have to be either per-project or a disable-able feature,
since there are cases where trailing whitespace is significant. Proof
by example: http://en.wikipedia.org/wiki/Whitespace_(programming_language)
BTW, if we had no trailing whitespace in the code, we could just make
another test that checks the source code for trailing whitespace and
rejects the patch if found :-)
> Another minor reason to avoid it is that accidental whitespace-only
> lines tell certain text editors that the two adjacent paragraphs are
> actually just one, which can be annoying for people who use
> paragraph-based navigation to jump around text or source files.
Yuk, but OK.
> What happens is that I notice the red dollar sign as I apply the
> patch, so I mention it.
Emacs users can be annoyed by trailing whitespace at edit time using:
(setq-default show-trailing-whitespace t)
;; Disable for specific modes where it's TOO annoying.
(add-hook 'w3m-mode-hook
(lambda ()
(setq show-trailing-whitespace nil)))
And clean it up using C-u M-x whitespace clean RET.
> I'm happy to do what darcs-users tells me to do. If more people
> complain, fine, we can ignore trailing whitespace too. If not, I'm
> going with my one-liners.
I have no problem with pointing it out as an aside while doing patch
review. I think it's a waste of time to write a review that JUST
complains about whitespace, in the same way that it's a waste to reply
to a post with "please don't top-post", but I think it's reasonable to
mention it if you're also going to answer the top-poster's question.
More information about the darcs-users
mailing list