Subject: commit conflicts!!

From: [email-masked]
Date: Sat, 7 Nov 1998 16:20:04 +0100

Hi all,

CVS seems to have a problem with whitespace conflicts.
I spent nearly half an hour resolving such conflicts
today. We must all agree on a common whitespace strategy
if we want to avoid this.

I suggest:

 - tab = 8 spaces
 - configure your emacs so that it actually uses tabs
   (you can have tabs replaced with spaces automatically)

Reeindenting of large parts *must* wait.

Bye

Dominik
-- 
Dominik Vogt, Hewlett-Packard GmbH, Dept. BVS
Herrenberger Str.130, 71034 Boeblingen, Germany
phone: 07031/14-4596, fax: 07031/14-3883, [email-masked]
--
Visit the official FVWM web page at <URL:http://www.hpc.uh.edu/fvwm/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked].

---

From: [email-masked] (Paul D. Smith)
Date: 08 Nov 1998 01:17:11 -0500

%% [email-masked] writes:

  dv> CVS seems to have a problem with whitespace conflicts.

Hmm.  Yes, it's a shame we can't just ignore whitespace changes.  You
can do so easily on diffs; why not on merges?

  dv> I suggest:

  dv>  - tab = 8 spaces
  dv>  - configure your emacs so that it actually uses tabs
  dv>    (you can have tabs replaced with spaces automatically)

Whatever everyone decides.  I, personally, never use TAB chars and
always use just spaces.  Then you never need to worry about how many
spaces are in a TAB or someone viewing it with them set incorrectly.
But I don't care that much (I'll have to figure out how to customize my
Emacs cc-mode sessions so when I'm editing my other files I keep the old
behavior and when I'm editing fvwm files I get the new; but that
shouldn't be too difficult).

One thing I do _very_strongly_ suggest is that everyone (editing with
Emacs, anyway) get a "trailing space" removing package.  I use one I
developed call rm-tspaces, which I will be happy to share; I know there
are a number of these.  Mine performs this function just before every
save of the file and allows you to set it up to always remove, never
remove, or ask whether or not to remove.  You can customize this on a
per-buffer basis (in a mode-hook, for example).

A lot of whitespace differences can be removed if everyone uses a tool
like this.

Longer-term we could come up with an indent command line that
"sanitized" the code and ask everyone to run it before checkin.  I don't
know that much about indent but it should be easy to get it to just fix
up whitespace without doing anything else, at least initially.

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <[email-masked]>         Network Management Development
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist
-------------------------------------------------------------------------------
   These are my opinions---Nortel Networks takes no responsibility for them.
--
Visit the official FVWM web page at <URL:http://www.hpc.uh.edu/fvwm/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked].

---

From: Dan Espen <[email-masked]>
Date: Sun, 08 Nov 1998 10:03:52 -0500

> shouldn't be too difficult).

If you create a solution, please share it.  The code I produce at work
has to be portable to MVS.  Since I or someone else may try to edit it
on MVS, I don't normally put tabs into C source code.

I guess the  emacs  solution could be  as simple   as seeing  the  CVS
directory or not in a cc-mode-hook.

> --
>  Paul D. Smith <[email-masked]>         Network Management Developmen

--
Dan Espen                                Phone: (732) 699-5570
444 Hoes Lane  Room RRC 1C-214           E-mail: [email-masked]
Piscataway, NJ 08854
--
Visit the official FVWM web page at <URL:http://www.hpc.uh.edu/fvwm/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked].

---

From: [email-masked]
Date: Wed, 11 Nov 1998 17:46:11 +0100

> A lot of whitespace differences can be removed if everyone uses a tool

Well, then gzip and post it (possibly with the lines from your
.emacs?).

> up whitespace without doing anything else, at least initially.

I tried GNU indent but it is not nearly as good as one would hope.
Don't know if it can remove trailing spaces.

Bye

Dominik

---

From: "Paul D. Smith" <[email-masked]>
Date: Mon, 16 Nov 1998 13:46:26 -0500 (EST)

>> A lot of whitespace differences can be removed if everyone uses a tool

  dv> Well, then gzip and post it (possibly with the lines from your
  dv> .emacs?).

Sorry, this got lost.  OK, attached is my latest rm-tspaces.el.  In my
.emacs, I have:

  ;; Removes all trailing whitespace at the end of all lines--this setting
  ;; makes it ask you by default.
  ;;
  (require 'rm-tspaces)
  (setq-default rm-trailing-spaces 1)

  ;; Turn it on unconditionally for various programming modes
  ;;
  (add-hook 'emacs-lisp-mode-hook 'rm-trailing-spaces-always)
  (add-hook 'cperl-mode-hook 'rm-trailing-spaces-always)
  (add-hook 'c-mode-common-hook 'rm-trailing-spaces-always)
  (add-hook 'makefile-mode-hook 'rm-trailing-spaces-always)

  ;; Turn it off unconditionally in other places
  ;;
  (add-hook 'message-mode-hook  'rm-trailing-spaces-never)
  (add-hook 'nnfolder-save-buffer-hook 'rm-trailing-spaces-never)

  dv> I tried GNU indent but it is not nearly as good as one would hope.
  dv> Don't know if it can remove trailing spaces.

Hmm.  I suppose a fairly straightforward perl or awk script would do
what we need :)

---

From: Dominik Vogt <[email-masked]>
Date: Mon, 23 Nov 1998 13:16:04 +0100

>   dv> Well, then gzip and post it (possibly with the lines from your

I can only recommend using this. Works pretty well, is trivial to
configure and perfectly safe (you are asked if there are whitespace
that would be removed).
 
Bye

Dominik

Bye

Dominik