all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Miles Bader <miles@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: gratuitous changes
Date: Fri, 31 Jan 2003 21:11:04 -0500	[thread overview]
Message-ID: <20030201021104.GA25915@gnu.org> (raw)
In-Reply-To: <200301312148.h0VLmG128712@rum.cs.yale.edu>

On Fri, Jan 31, 2003 at 04:48:16PM -0500, Stefan Monnier wrote:
> But I still think that what happened with keyboard.c is bad:
> turning every whitespace-only line into an empty line.  This is
> bad because hitting TAB somewhere or calling indent-region on
> a piece of code will re-introduce those spaces, so we end up
> with never ending spurious conflicts.

This is not true -- indent-region will not add spaces to an empty line, at
least in C or lisp code (it seems to try to preserve whitespace exactly,
which is obviously good for the sort of reason you give in your message).

In fact, emacs indentation commands in general seem to try to delete spaces
from empty lines when possible, e.g., C-j on an empty line filled with spaces
will remove the spaces before inserting a newline and indenting the new line,
and indent-rigidly will remove  spaces from empty lines.

The exception seems to be cases where it's expected that you will immediately
add text to the line, such as TAB, or C-j.  As I expect most people won't
randomly hit TAB on empty lines, I don't think this should be a problem.

> Please be careful when you commit changes.  Those of us who have
> extensive locally modified files (i.e. uncomitted changes)
> will be grateful for it.

This, OTOH, is very true.  I think it's OK to `fix' whitespace issues if they
occur immediately adjacent to a change you're already making, but otherwise
it can be quite annoying for people maintaing patches or CVS branches.

In particular, it's a bad idea to blindly use `delete-trailing-whitespace'
(e.g. in write-file-hooks) on files you're going to check in.

-Miles
-- 
97% of everything is grunge

  parent reply	other threads:[~2003-02-01  2:11 UTC|newest]

Thread overview: 59+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-01-31 21:48 gratuitous changes Stefan Monnier
2003-01-31 22:16 ` Andreas Schwab
2003-01-31 22:51   ` John Wiegley
2003-01-31 23:01 ` Juanma Barranquero
2003-02-01  0:00   ` Stefan Monnier
2003-02-01  6:51     ` Robert Anderson
2003-02-03 15:09       ` Stefan Monnier
2003-02-03 16:20         ` Robert Anderson
2003-02-01  9:54     ` Juanma Barranquero
2003-02-01  2:11 ` Miles Bader [this message]
2003-02-01 18:44   ` Bill Wohler
2003-02-01 22:11 ` Richard Stallman
2003-02-01 23:28   ` Martin Stjernholm
2003-02-02  5:52     ` Eli Zaretskii
2003-02-02  6:14       ` Miles Bader
2003-02-06 16:34         ` Martin Stjernholm
2003-02-06 17:22           ` Miles Bader
2003-02-10  0:29             ` Martin Stjernholm
2003-02-03 14:57     ` Stefan Monnier
2003-02-02  5:56 ` Eli Zaretskii
2003-02-02 12:56   ` Juanma Barranquero
2003-02-02 13:59   ` Kim F. Storm
2003-02-03 13:01     ` Richard Stallman
2003-02-03 14:11       ` Juanma Barranquero
2003-02-03 14:54         ` Stefan Monnier
2003-02-03 15:01           ` Juanma Barranquero
2003-02-04 14:59       ` Juanma Barranquero
2003-02-04 16:09         ` Robert Anderson
2003-02-04 16:44           ` Juanma Barranquero
2003-02-04 17:14             ` Robert Anderson
2003-02-04 17:22               ` Juanma Barranquero
2003-02-04 19:46         ` Eli Zaretskii
2003-02-04 20:16           ` Juanma Barranquero
2003-02-04 20:22             ` Stefan Monnier
2003-02-04 20:44               ` Nick Roberts
2003-02-04 22:59                 ` Edward O'Connor
2003-02-04 23:19                   ` Juanma Barranquero
2003-02-05  0:32                   ` Kim F. Storm
2003-02-05  0:39                     ` Kim F. Storm
2003-02-05  0:49                       ` Kenichi Handa
2003-02-05  4:24                     ` Luc Teirlinck
2003-02-05  4:51                       ` Miles Bader
2003-02-06  2:42                   ` Richard Stallman
2003-02-06  4:09                     ` Luc Teirlinck
2003-02-07  9:18                       ` Richard Stallman
2003-02-04 23:18                 ` Juanma Barranquero
2003-02-05  0:42                   ` Stefan Monnier
2003-02-05  6:03                 ` Eli Zaretskii
2003-02-06  2:42                 ` Richard Stallman
2003-02-06  2:54                   ` Luc Teirlinck
2003-02-04 23:14               ` Juanma Barranquero
2003-02-05  6:01             ` Eli Zaretskii
2003-02-05  8:18               ` Juanma Barranquero
2003-02-05 15:30                 ` Eli Zaretskii
2003-02-14 22:56                   ` Thien-Thi Nguyen
2003-02-05  0:14         ` Richard Stallman
2003-02-07 14:02 ` Francesco Potorti`
2003-02-10  1:47   ` Miles Bader
2003-02-10 10:09     ` Francesco Potorti`

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

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

  git send-email \
    --in-reply-to=20030201021104.GA25915@gnu.org \
    --to=miles@gnu.org \
    --cc=emacs-devel@gnu.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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.