From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Neil Jerram Newsgroups: gmane.lisp.guile.devel Subject: Re: rfc: (add-hook 'before-save-hook 'delete-trailing-whitespace) Date: Thu, 21 Jan 2010 20:46:26 +0000 Message-ID: <87eilj2nkt.fsf@ossau.uklinux.net> References: <87d41ewezl.fsf@ambire.localdomain> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1264106824 6751 80.91.229.12 (21 Jan 2010 20:47:04 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 21 Jan 2010 20:47:04 +0000 (UTC) Cc: guile-devel@gnu.org To: Thien-Thi Nguyen Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Thu Jan 21 21:46:57 2010 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NY3vd-0004L0-4E for guile-devel@m.gmane.org; Thu, 21 Jan 2010 21:46:57 +0100 Original-Received: from localhost ([127.0.0.1]:54440 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NY3ve-0008L0-5Z for guile-devel@m.gmane.org; Thu, 21 Jan 2010 15:46:58 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NY3va-0008Ho-OJ for guile-devel@gnu.org; Thu, 21 Jan 2010 15:46:54 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NY3vV-0008A5-C7 for guile-devel@gnu.org; Thu, 21 Jan 2010 15:46:53 -0500 Original-Received: from [199.232.76.173] (port=51949 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NY3vU-00089j-Mp for guile-devel@gnu.org; Thu, 21 Jan 2010 15:46:48 -0500 Original-Received: from mail3.uklinux.net ([80.84.72.33]:35852) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NY3vU-0000Nm-Cg for guile-devel@gnu.org; Thu, 21 Jan 2010 15:46:48 -0500 Original-Received: from arudy (host86-182-229-157.range86-182.btcentralplus.com [86.182.229.157]) by mail3.uklinux.net (Postfix) with ESMTP id 98F4E1F6839; Thu, 21 Jan 2010 20:46:47 +0000 (GMT) Original-Received: from arudy (arudy [127.0.0.1]) by arudy (Postfix) with ESMTP id F090A3801F; Thu, 21 Jan 2010 20:46:26 +0000 (GMT) In-Reply-To: <87d41ewezl.fsf@ambire.localdomain> (Thien-Thi Nguyen's message of "Wed, 13 Jan 2010 10:06:38 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.4-2.6 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:9912 Archived-At: Thien-Thi Nguyen writes: > The above form lives in my Emacs init flow, causing trailing whitespace to be > deleted on `save-buffer' (C-x C-s). For many projects (but not Guile) this > DTRT, because trailing whitespace is not tolerated. Jim Meyering gives a > nice rationale in . I'm afraid those rationales don't persuade me: >> - trailing blanks can change the semantics of your code That's what tests are for. >> - these differences can lead to unnecessary merge conflicts Hasn't been a problem in practice AFAIK. I've been doing a lot of merging at work recently, with a lot of real merge conflicts. The few that are caused by whitespace are easy to spot, and give me a pleasant interlude between the ones that are really difficult. >> - some people use editors that automatically convert / +\t/ >> sequences to just TABs (this is relevant not just for leading >> indentation, but also for e.g., regular expressions, where >> it's easy to write a e.g. "[ ]" (space-TAB) as part of a >> grep or sed pattern. Of course, if you're using a modern >> enough tool, you can avoid the problem by using "\t". This >> is why it is better to write the above as "[ ]" (TAB-space). I can't see why this has to do with _trailing_ whitespace, and it seems obvious to me that those editors are just broken. >> - some packages (coreutils :-) have a "make distcheck" rule that will >> fail if it finds any such offending sequence in its sources. We don't have that. > I propose Guile also not tolerate trailing whitespace. What do people think? If you are concerned that your hook is going to generate diffs that other developers might think are spurious - I'd say don't worry about that. I personally won't object to that, and I don't think Andy or Ludo would either. If you anticipate some other practical problem, can you say more about what it is? Thanks, Neil