On 26/09/2007, Enrico Tröger enrico.troeger@uvena.de wrote:
On Wed, 26 Sep 2007 15:49:25 +0100, "Catalin Marinas" catalin.marinas@gmail.com wrote:
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.
I use a patch management system (StGIT) to automate the patch maintenance, sending, updating etc. and I have tens of patches. It's a bit more difficult to edit each patch manually.
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.
This sounds good.
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 ;-).
I don't really care about trailing spaces on a line I edit, they can stay. As I said in a different e-mail, I do not want to create new trailing spaces. The current newline behaviour is to leave the indentation spaces on empty lines. The simplest fix was the one I sent (and with which I got used from emacs).