bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: diff -b does not actually work with newlines


From: Paul Eggert
Subject: Re: diff -b does not actually work with newlines
Date: Thu, 19 Jul 2007 11:31:57 -0700
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux)

David Kastrup <address@hidden> writes:

> b) add options, say

Easier said than done, I'm afraid.

> a) the bit about "not including <newline>s" be added to the info
> file and help string.  It is absolutely essential.

Thanks, I made the following change to the documentation.  I don't
agree that the help strings need change.  Help strings are not
intended for detailed description; they're intended only as brief
reminders.  This issue doesn't make the cut.  The help strings are
already too long as it is.

2007-07-19  Paul Eggert  <address@hidden>

        * doc/diff.texi (White Space): Note that newline always ends a line,
        so -w doesn't ignore newline-related changes.  Problem reported by
        David Kastrup.

--- doc/diff.texi       6 Jun 2007 23:40:16 -0000       1.31
+++ doc/diff.texi       19 Jul 2007 18:26:38 -0000      1.32
@@ -1,5 +1,5 @@
 \input texinfo @c -*-texinfo-*-
address@hidden $Id: diff.texi,v 1.31 2007/06/06 23:40:16 eggert Exp $
address@hidden $Id: diff.texi,v 1.32 2007/07/19 18:26:38 eggert Exp $
 @comment %**start of header
 @setfilename diff.info
 @include version.texi
@@ -309,7 +309,7 @@ Here lyeth muche rychnesse in lytell spa
 The @option{-w} or @option{--ignore-all-space} option is stronger still.
 It ignores differences even if one line has white space where
 the other line has none.  @dfn{White space} characters include
-tab, newline, vertical tab, form feed, carriage return, and space;
+tab, vertical tab, form feed, carriage return, and space;
 some locales may define additional characters to be white space.
 With this option, @command{diff} considers the
 following two lines to be equivalent, where @samp{$} denotes the line
@@ -320,6 +320,12 @@ Here lyeth  muche  rychnesse in lytell s
   He relyeth much erychnes  seinly tells pace.  --John Heywood   ^M$
 @end example
 
+For many other programs newline is also a white space character, but
address@hidden is a line-oriented program and a newline character
+always ends a line.  Hence the @option{-w} or
address@hidden option does not ignore newline-related
+changes; it ignores only other white space changes.
+
 @node Blank Lines
 @section Suppressing Differences Whose Lines Are All Blank
 @cindex blank line difference suppression




reply via email to

[Prev in Thread] Current Thread [Next in Thread]