all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Jim Meyering <jim@meyering.net>
To: David Kastrup <dak@gnu.org>
Cc: Paul Eggert <eggert@CS.UCLA.EDU>,
	bug-gnu-utils@gnu.org, Stefan Monnier <monnier@iro.umontreal.ca>,
	rms@gnu.org, emacs-devel@gnu.org
Subject: Re: diff-mode misinterprets empty lines.
Date: Wed, 05 Dec 2007 12:27:33 +0100	[thread overview]
Message-ID: <87k5nt2xga.fsf@rho.meyering.net> (raw)
In-Reply-To: <857ijtwgpw.fsf@lola.goethe.zz> (David Kastrup's message of "Wed,  05 Dec 2007 11:58:35 +0100")

David Kastrup <dak@gnu.org> wrote:

> Jim Meyering <jim@meyering.net> writes:
>
>> Since I was thinking of using that new option always, I considered
>> changing the source to make the default in my private binary be to
>> enable the new option.  Since I'd rather not have to make private
>> changes, what do you think about having a compile-time option to
>> change the default?  Not even a configure-time flag.
>>
>> Since Emacs may eventually change to accept the new format, it may
>> make sense to change the default and to provide a
>> --no-suppress-blank-empty option.
>
> No, it does not make sense to change the default.  Emacs is just one of
> many tools processing diff output.  I remember gratuitous breakage of
> git, too.  There are far too many tools relying on the _documented_ diff
> output formats (please read
> (info "(diff) Context")

Hi David,

My sole interest is in the change to the *unidiff* format.
And that was not documented, back then.

> for a detailed explanation of the diff formats) that it makes sense
> breaking things all around for no tangible benefit.

The benefit was tangible enough to me to propose the change, and to Paul
to allow and extend it.  I'm sure you know that git tools have been
accepting the trailing-blank-free format for over a year, so they too
saw some benefit in accepting the new format.

Too many tools these days can automatically remove trailing blanks.
If I keep my code free of trailing blanks (and I do), those tools should
have no affect on my code.  I want the same benefit for diffs of my code.
IMHO, it's an improvement at least to allow a trailing-blank-free diff format.

> I don't understand why this change was made in the first place, and I
> don't understand why people would want to gratuitously make the format
> less reliable to parse by tools, when the main usage _is_ the
> application by independent tools.

You seem to underestimate Paul's concern for portability.  Git was young
at the time, and the format they cared about was unidiff, so it wasn't
*that* big a deal to fix it.  If we had known about the incompatibility
with diff-mode back then, I'm sure the new behavior would never have
been made the default.




  reply	other threads:[~2007-12-05 11:27 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-29  1:03 diff-mode misinterprets empty lines Richard Stallman
2007-11-29  9:26 ` David Kastrup
2007-11-29 16:09   ` Stefan Monnier
2007-12-05  7:35     ` Paul Eggert
2007-12-05 10:17       ` Jim Meyering
2007-12-05 10:58         ` David Kastrup
2007-12-05 11:27           ` Jim Meyering [this message]
2007-12-05 12:33             ` Andreas Schwab
2007-12-05 12:39               ` Jim Meyering
2007-12-05 14:59             ` David Kastrup
2007-12-05 17:45               ` Paul Eggert
2007-12-05 18:12                 ` David Kastrup
2007-12-06  0:54                   ` Paul Eggert
2007-12-06 10:11                     ` Andreas Schwab
2007-12-05 21:04                 ` Juanma Barranquero
2007-12-06 15:39                   ` Stefan Monnier
2008-01-06  0:15                     ` Glenn Morris
2008-01-06 18:09                       ` Richard Stallman
2008-01-14 21:08                       ` Stefan Monnier
2008-01-14 21:38                         ` Glenn Morris
2008-01-14 22:46                           ` Glenn Morris
2008-01-14 23:35                             ` Diffs between %s and %s end here (was: diff-mode misinterprets empty lines.) Reiner Steib
2008-01-15  3:29                               ` Diffs between %s and %s end here Miles Bader
2008-01-16  8:13                                 ` Glenn Morris
2008-01-15  0:09                             ` diff-mode misinterprets empty lines Dan Nicolaescu
2008-01-29 18:37                         ` Chong Yidong
2008-02-19 16:32                           ` Stefan Monnier
2008-02-19 20:44                             ` Stefan Monnier
2007-12-06  2:11               ` Richard Stallman
2007-12-05 17:48         ` Paul Eggert
2007-12-05 17:50           ` Jim Meyering
2007-11-29 22:31   ` Richard Stallman
2007-11-29 23:12     ` David Kastrup
2007-11-30  2:03     ` Stefan Monnier
  -- strict thread matches above, loose matches on Subject: below --
2007-11-27 18:04 Sergei Organov

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=87k5nt2xga.fsf@rho.meyering.net \
    --to=jim@meyering.net \
    --cc=bug-gnu-utils@gnu.org \
    --cc=dak@gnu.org \
    --cc=eggert@CS.UCLA.EDU \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=rms@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.