help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: removing white space highlight


From: Robert Thorpe
Subject: Re: removing white space highlight
Date: Mon, 29 Feb 2016 02:43:14 +0000

Emanuel Berg <embe8573@student.uu.se> writes:

> Robert Thorpe <rt@robertthorpeconsulting.com> writes:
>
>> Every line that has whitespace removed is flagged as
>> modified. It's added to the repository with my name,
>> date and a new revision number. So, the problem I've
>> described still occurs.
>
> The improvement is that the code gets cleaned up.
> Which has to be done once, then invisible-to-everyone
> automatization makes sure no more trailing whitespace
> can ever be added.

We all agree about the improvement.  The problem is making it happen
without destroying the power of version control.

> This is completely free of charge with no penalty to
> it whatsoever.

How do you remove the penalty then?  How do you make blame/annotate and
similar tools work properly despite the changes in whitespace?

Are you arguing that annotate and diffs with previous version don't
matter?

> Before anything enters there, cleaning is
> automatically done, but not logged (well, not logged
> as normal edits are anyway)

Most VC systems don't support that.  The only way you can do that is by
either:
* Writing a feature into the version control program itself.
* Writing a program that understands the file format that the VC
  repository is in.
Neither path is easy.  Version control programs are long and complex.
Many are longer than 50000 lines.  The file formats they use for the
repository are complex too and very difficult to reverse engineer.  I
know because I had to reverse engineer one of them once.

> The theoretical reason why this is possible and easy
> is that nobody (human nor machine) has any interest in
> or benefits from trailing whitespace. 

Yes, it's simple in theory, but very difficult in practice.  I'm
disappointed to see you of all people confuse the theoretical and the
practical.

BR,
Robert Thorpe



reply via email to

[Prev in Thread] Current Thread [Next in Thread]