[Geany] [PATCH] Strip trailing spaces when editing

Enrico Tröger enrico.troeger at xxxxx
Wed Sep 26 16:22:12 UTC 2007


On Wed, 26 Sep 2007 15:49:25 +0100, "Catalin Marinas"
<catalin.marinas at gmail.com> wrote:

> 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.
Nice idea. I know the described problem when creating patches on
sources where trailing spaces exist. In general, I delete all parts of
the patch which are created because of trailing spaces.

Anyway, I would like to add an option. So, the user can decide whether
to always get trailing spaces cut off at saving time or on newline. The
problem is, sometimes you edit files but don't insert a newline, so the
trailing spaces still exist. If you think of this and add and remove
the newline to manually invoke the function, all is fine. But I guess
there are some people like me, who probably won't think of it ;-).


Regards,
Enrico

-- 
Get my GPG key from http://www.uvena.de/pub.key
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.geany.org/pipermail/users/attachments/20070926/59b9b553/attachment.pgp>


More information about the Users mailing list