From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Emanuel Berg Newsgroups: gmane.emacs.help Subject: Re: removing white space highlight Date: Fri, 26 Feb 2016 20:48:51 +0100 Message-ID: <877fhrjlr0.fsf@debian.uxu> References: <878u28mj7z.fsf@debian.uxu> <87io1cuqhx.fsf@robertthorpeconsulting.com> <87ziuokv2g.fsf@debian.uxu> <20160225221634972375976@bob.proulx.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1456516172 22541 80.91.229.3 (26 Feb 2016 19:49:32 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 26 Feb 2016 19:49:32 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Feb 26 20:49:22 2016 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aZOO4-0007Tv-Kn for geh-help-gnu-emacs@m.gmane.org; Fri, 26 Feb 2016 20:49:16 +0100 Original-Received: from localhost ([::1]:51820 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aZOO4-0005dT-6R for geh-help-gnu-emacs@m.gmane.org; Fri, 26 Feb 2016 14:49:16 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42829) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aZONt-0005d5-80 for help-gnu-emacs@gnu.org; Fri, 26 Feb 2016 14:49:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aZONo-0001EW-80 for help-gnu-emacs@gnu.org; Fri, 26 Feb 2016 14:49:05 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]:52635) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aZONo-0001DR-1w for help-gnu-emacs@gnu.org; Fri, 26 Feb 2016 14:49:00 -0500 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1aZONk-0007Gm-Mx for help-gnu-emacs@gnu.org; Fri, 26 Feb 2016 20:48:56 +0100 Original-Received: from nl106-137-170.student.uu.se ([130.243.137.170]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 26 Feb 2016 20:48:56 +0100 Original-Received: from embe8573 by nl106-137-170.student.uu.se with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 26 Feb 2016 20:48:56 +0100 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: help-gnu-emacs@gnu.org Original-Lines: 99 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: nl106-137-170.student.uu.se Mail-Copies-To: never User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) Cancel-Lock: sha1:lDxXoMszFy0UwCmk5tOhWOyUac4= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:109327 Archived-At: Bob Proulx writes: > If you have placed an automated routine in your > particular editor (remember that other people on > your team will use different editors with differing > capabilities) that touches every line in the file > then you will start making changesets that contain > a lot of noise. You will check in a result that > cannot be reasonably reviewed by a peer review > group. If the group is at all reasonable they will > reject your change-set and send you back to work on > it further. The Elisp code I've posted and the Emacs batch command is to show how easy this can be automatized. For this to work at the level of peer review, it can't be implemented exactly like that. It has do be done centrally or at the level of the peer review software which everyone working on the project is assumed to use. That clarified, I still don't think it is a difficult thing to do. Because bottom line, no one ever needs that trailing whitespace. It can always be safely just dropped with nothing to it! > And even for those folks who are just working solo. > Your work is your reputation. If your work is good > then so is your reputation. If your work is crufty > then the same with your reputation. Because of > version control your work is not just the finished > file but the history of the file too. Really? Are people reviewing the history of files so they can bash people's reputation even tho the end result is good? If so, I'm happy I don't do that on either side of it... While I do not consider cleaning files to be the spoilation of anyone's reputation, I do not suggest anyone does this "client-side". While it'll work some people will add more later (their reputation will drop I suppose) and then the circus is afoot. No - it should be done "server-side" once (with a command) and then automatically never allowed inside again. Or the automatization can be put to work and then file by file will be cleaned in time. > This is why I think cleanup should be done > explicitly as an explicit action and not as a side > effect of other random changes. I guess it depends how big the files are, how active people are reviewing them, and how specific information you get from the software what changes has been made. Probably it isn't difficult to see where there has been qualitative changes and where there has just been a bunch of trailing whitespace removed. Even so, I agree "explicit action" to the entire project is preferable, and my command can do this to the entire project in one keystroke. After that, automatization (also very simple) is implemented to drop trailing whitespace forever on and to not regard that as something anyone ever has to "review". Because again, no one benefits from it so no one should want it. >> However not wanting to have trailing whitespace and >> having it automatized in four lines of Elisp and >> then have the desired behavior forever seems like >> rather good craftmanship to me... > > Your good craftmanship feels to me like a buldozer > rolling through regardless of the other traffic. > You will get to where you want to go but no one will > want to be near you while you are doing it. Rather like a surgeon removing dead tissue with a waldo robot arm holding a laser scalpel... Recall that `remove-trailing-whitespace' doesn't do anything if there is nothing to be done! > Aside: What? You haven't painted your house in the > last year? People will think your house is abandoned > if you haven't changed the paint color at least > every year. That is the way some software projects > feel to me. Definitely. -- underground experts united http://user.it.uu.se/~embe8573