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 09:45:59 -0800 Message-ID: <87hcix827c.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> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1196876900 22759 80.91.229.12 (5 Dec 2007 17:48:20 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 5 Dec 2007 17:48:20 +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 Wed Dec 05 18:48:27 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 1IzyLz-0002j0-6U for gnu-bug-gnu-utils@m.gmane.org; Wed, 05 Dec 2007 18:48:11 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IzyLi-00077A-Cy for gnu-bug-gnu-utils@m.gmane.org; Wed, 05 Dec 2007 12:47:54 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IzyK9-00052R-6c for bug-gnu-utils@gnu.org; Wed, 05 Dec 2007 12:46:17 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IzyK7-000501-Lw for bug-gnu-utils@gnu.org; Wed, 05 Dec 2007 12:46:16 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IzyK7-0004zn-Gg; Wed, 05 Dec 2007 12:46:15 -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 1IzyJx-0007ph-KE; Wed, 05 Dec 2007 12:46:06 -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 lB5Hk0Kq011258; Wed, 5 Dec 2007 09:46:00 -0800 (PST) Original-Received: from eggert by penguin.cs.ucla.edu with local (Exim 4.63) (envelope-from ) id 1IzyJr-0004a6-U8; Wed, 05 Dec 2007 09:45:59 -0800 In-Reply-To: <854pexur0g.fsf@lola.goethe.zz> (David Kastrup's message of "Wed\, 05 Dec 2007 15\:59\:11 +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:15310 gmane.emacs.devel:84737 Archived-At: David Kastrup writes: >> Too many tools these days can automatically remove trailing blanks. > > Why would you apply them to a _diff_? We're beating a dead horse here, since the default behavior has been changed back, but since you're interested in doing an autopsy.... I regularly apply many tools to a diff. I use Emacs, and other text editors. I send diffs via email, and I store them as part of other text files. The most recent email I sent to this forum contained a diff, for example. In environments that use diffs a lot, trailing white space can cause problems. Here's one example. Emacs has a way of highlighting trailing white space. This feature is a nice thing to have in general, since it highlights white space that in some applications can cause harm (C source code, makefiles, etc.) and that the user normally cannot see. But if 'diff' output contains unnecessary trailing white space, the highlighted white space turns into false alarms on your screen. In general, a false alarm is a bad thing: either it causes you to turn off the alarm mechanism, or it causes you to ignore similar alarms in the future. So that is at least one good motivation for suppressing unnecessary trailing white space. I'm not saying that it is always the right thing to suppress trailing blanks; I'm only saying that there are good reasons to do so in some cases. By the way, the diff that I sent in my previous email suppressed the trailing white space in question. Did you notice? I've used this format for many months now, for patches that I send via email. No problems have been reported with these patches. And I send out my fair share of patches.