From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Paul Eggert Newsgroups: gmane.comp.gnu.utils.bugs,gmane.emacs.devel Subject: Re: diff-mode misinterprets empty lines. Date: Wed, 05 Dec 2007 16:54:52 -0800 Message-ID: <87ir3c63s3.fsf@penguin.cs.ucla.edu> References: <85ir3l767y.fsf@lola.goethe.zz> <87ir3d1tn7.fsf@penguin.cs.ucla.edu> <878x494f9w.fsf@rho.meyering.net> <857ijtwgpw.fsf@lola.goethe.zz> <87k5nt2xga.fsf@rho.meyering.net> <854pexur0g.fsf@lola.goethe.zz> <87hcix827c.fsf@penguin.cs.ucla.edu> <85d4tlt3i0.fsf@lola.goethe.zz> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1196902524 12255 80.91.229.12 (6 Dec 2007 00:55:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 6 Dec 2007 00:55:24 +0000 (UTC) Cc: rms@gnu.org, bug-gnu-utils@gnu.org, Jim Meyering , Stefan Monnier , emacs-devel@gnu.org To: David Kastrup Original-X-From: bug-gnu-utils-bounces+gnu-bug-gnu-utils=m.gmane.org@gnu.org Thu Dec 06 01:55:32 2007 Return-path: Envelope-to: gnu-bug-gnu-utils@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1J051W-00032n-C1 for gnu-bug-gnu-utils@m.gmane.org; Thu, 06 Dec 2007 01:55:30 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1J051F-0003gD-Ec for gnu-bug-gnu-utils@m.gmane.org; Wed, 05 Dec 2007 19:55:13 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1J051D-0003eX-AB for bug-gnu-utils@gnu.org; Wed, 05 Dec 2007 19:55:11 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1J0518-0003Xs-RF for bug-gnu-utils@gnu.org; Wed, 05 Dec 2007 19:55:11 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1J0518-0003Xc-J5; Wed, 05 Dec 2007 19:55:06 -0500 Original-Received: from kiwi.cs.ucla.edu ([131.179.128.19]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1J0510-0005TF-65; Wed, 05 Dec 2007 19:54:58 -0500 Original-Received: from penguin.cs.ucla.edu (Penguin.CS.UCLA.EDU [131.179.64.200]) by kiwi.cs.ucla.edu (8.13.8+Sun/8.13.8/UCLACS-6.0) with ESMTP id lB60sq87004010; Wed, 5 Dec 2007 16:54:52 -0800 (PST) Original-Received: from eggert by penguin.cs.ucla.edu with local (Exim 4.63) (envelope-from ) id 1J050u-0007ly-AX; Wed, 05 Dec 2007 16:54:52 -0800 In-Reply-To: <85d4tlt3i0.fsf@lola.goethe.zz> (David Kastrup's message of "Wed\, 05 Dec 2007 19\:12\:23 +0100") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Solaris 10 (beta) X-BeenThere: bug-gnu-utils@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports for the GNU utilities List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-utils-bounces+gnu-bug-gnu-utils=m.gmane.org@gnu.org Errors-To: bug-gnu-utils-bounces+gnu-bug-gnu-utils=m.gmane.org@gnu.org Xref: news.gmane.org gmane.comp.gnu.utils.bugs:15314 gmane.emacs.devel:84763 Archived-At: David Kastrup writes: > In environments that use diffs, trailing white space needs to be > preserved. Otherwise you could, for example, never have a diff that > removes trailing white space. Yes, of course, but the trailing white space you're talking about is unaffected by the change, so this is not the issue here. We are talking only about trailing white space generated by the diff format itself, not about trailing white space in the data. > it is is wrong to interpret diff output with an > unmodified trailing whitespace detection mode. Not if --suppress-blank-empty is used. With that option, all the trailing white space will be about changes to data, which is normally something I want to see. It's much easier to see changings that affect only trailing white space that way. That is an advantage of suppressing the blanks in question. If Emacs could be improved to mark only important trailing white space; then --suppress-blank-empty would be less useful (at least, less useful to Emacs users). But I don't see how to do that in general, when diffs are mixed in with other text. > The trailing white space is not unnecessary since it is part of the > format. Not necessarily. diff outputs several formats. The definition of the format is up to us, and depends on utility; it is not carved in stone. Unless you count draft POSIX as the "stone"; in that case, the trailing blanks of diff -u format are indeed unnecessary. > Would you be bothering > messing with trailing whitespace in the first place if it was > human-visible normally? Yes. Human-visible trailing white space was one of the motivations for this change.