From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Martin Stjernholm Newsgroups: gmane.emacs.devel Subject: Re: gratuitous changes Date: 02 Feb 2003 00:28:21 +0100 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <5b3cn7lgx6.fsf@lister.roxen.com> References: <200301312148.h0VLmG128712@rum.cs.yale.edu> Reply-To: bug-cc-mode@gnu.org NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1044142140 16355 80.91.224.249 (1 Feb 2003 23:29:00 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sat, 1 Feb 2003 23:29:00 +0000 (UTC) Cc: Stefan Monnier Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18f74E-0004FY-00 for ; Sun, 02 Feb 2003 00:28:58 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 18f7B4-0001vp-00 for ; Sun, 02 Feb 2003 00:36:02 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18f74a-0003qN-07 for emacs-devel@quimby.gnus.org; Sat, 01 Feb 2003 18:29:20 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18f74H-0003dU-00 for emacs-devel@gnu.org; Sat, 01 Feb 2003 18:29:01 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18f73s-0002zO-00 for emacs-devel@gnu.org; Sat, 01 Feb 2003 18:28:37 -0500 Original-Received: from godzilla.roxen.com ([194.52.182.190] helo=mail.roxen.com) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18f73h-0002l3-00; Sat, 01 Feb 2003 18:28:26 -0500 Original-Received: by mail.roxen.com (Postfix, from userid 52) id CBAE899C5; Sun, 2 Feb 2003 00:28:24 +0100 (MET) Original-Received: from lister.roxen.com (lister.roxen.com [194.52.182.147]) by mail.roxen.com (Postfix) with ESMTP id 8AB7699E1; Sun, 2 Feb 2003 00:28:21 +0100 (MET) Original-To: rms@gnu.org In-Reply-To: Original-Lines: 34 User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7 Original-cc: emacs-devel@gnu.org Original-cc: bug-cc-mode@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Emacs development discussions. List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:11281 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:11281 Richard Stallman wrote: > But I still think that what happened with keyboard.c is bad: > turning every whitespace-only line into an empty line. > > I see what you mean. At the same time, it is tidier > not to have those excess spaces; we don't want to treat > them as sacred. I don't know why this got cc'd to the CC Mode address, but I have something to say on the subject of spurious whitespaces anyway: The matter of whitespace handling is a personal preference, be it handling on whitespace on empty lines, other trailing whitespace, or indent-tabs-mode. While everyone should use whatever settings they like, it becomes a problem when someone applies his/her preference over a whole file in a shared development environment, as this thread has shown. To address that, I developed the package ws-trim.el. What's special about it is that it normally only trims whitespace on lines which are changed through other editing. In my experience this works well; the code edited by oneself gets the whitespace trimming one likes, while other code in the same file isn't affected so cvs differences seldom become unnecessarily large. The trimming is done whenever the point leaves a line that has been changed. Editing that affects more than one line, e.g. pasting of blocks, is normally not affected. I'm willing to contribute this package if there's interest. (I said that when I announced it back in -97 too, but RMS thought at that point that the all-or-nothing approach in whitespace.el was sufficient.)