[Geany] [PATCH] Strip trailing spaces when editing

Catalin Marinas catalin.marinas at xxxxx
Wed Sep 26 14:49:25 UTC 2007


Hi,

The feature to strip the trailing spaces in a document at save time is
indeed useful but this also affects the lines I didn't write in a
file. Since I work a lot with patches, modifying one line in a file
may lead to a longer patch because of the white space removal. This
makes reviewing the patches on public mailing lists more difficult
(and the Linux people might reject the patch, unless one does two
separate patches, one for trailing spaces stripping and the other
being the real modification).

OTOH, trailing spaces are not accepted on the projects I work, though
some files still have them.

My solution (this is actually the behaviour of emacs) is to strip the
trailing spaces of a single line when newline is inserted.

See the attached patch. If you don't like to always have this
behaviour, could you please consider adding a configuration option?

Thanks.

-- 
Catalin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: strip-line-trailing-spaces.patch
Type: text/x-patch
Size: 2497 bytes
Desc: not available
URL: <http://lists.geany.org/pipermail/users/attachments/20070926/3d37527a/attachment.bin>


More information about the Users mailing list