unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Neil Jerram <neil@ossau.uklinux.net>
To: Thien-Thi Nguyen <ttn@gnuvola.org>
Cc: guile-devel@gnu.org
Subject: Re: rfc: (add-hook 'before-save-hook 'delete-trailing-whitespace)
Date: Thu, 21 Jan 2010 20:46:26 +0000	[thread overview]
Message-ID: <87eilj2nkt.fsf@ossau.uklinux.net> (raw)
In-Reply-To: <87d41ewezl.fsf@ambire.localdomain> (Thien-Thi Nguyen's message of "Wed, 13 Jan 2010 10:06:38 +0100")

Thien-Thi Nguyen <ttn@gnuvola.org> 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 <http://old.nabble.com/whitespace-cleanup-td6828228.html>.

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




  parent reply	other threads:[~2010-01-21 20:46 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-13  9:06 rfc: (add-hook 'before-save-hook 'delete-trailing-whitespace) Thien-Thi Nguyen
2010-01-13 10:53 ` Ludovic Courtès
2010-01-13 14:22   ` Thien-Thi Nguyen
2010-01-21 20:31   ` Neil Jerram
2010-01-21 20:44     ` Ludovic Courtès
2010-01-13 20:02 ` Andy Wingo
2010-01-13 20:45   ` Thien-Thi Nguyen
2010-01-14  0:10     ` Ludovic Courtès
2010-01-21 20:46 ` Neil Jerram [this message]
2010-01-23  0:38   ` Thien-Thi Nguyen
2010-01-23 16:10     ` Ludovic Courtès
2010-02-09 13:30       ` Thien-Thi Nguyen
2010-02-14 14:20         ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87eilj2nkt.fsf@ossau.uklinux.net \
    --to=neil@ossau.uklinux.net \
    --cc=guile-devel@gnu.org \
    --cc=ttn@gnuvola.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).