From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.comp.gnu.utils.bugs,gmane.emacs.devel Subject: Re: diff-mode misinterprets empty lines. Date: Wed, 05 Dec 2007 19:12:23 +0100 Message-ID: <85d4tlt3i0.fsf@lola.goethe.zz> 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> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1196878373 28454 80.91.229.12 (5 Dec 2007 18:12:53 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 5 Dec 2007 18:12:53 +0000 (UTC) Cc: rms@gnu.org, bug-gnu-utils@gnu.org, Jim Meyering , Stefan Monnier , emacs-devel@gnu.org To: Paul Eggert Original-X-From: bug-gnu-utils-bounces+gnu-bug-gnu-utils=m.gmane.org@gnu.org Wed Dec 05 19:13:01 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 1Izyk0-0005RZ-9j for gnu-bug-gnu-utils@m.gmane.org; Wed, 05 Dec 2007 19:13:00 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Izyjj-0004sQ-IT for gnu-bug-gnu-utils@m.gmane.org; Wed, 05 Dec 2007 13:12:43 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Izyjf-0004mx-T2 for bug-gnu-utils@gnu.org; Wed, 05 Dec 2007 13:12:40 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Izyjf-0004kr-1c for bug-gnu-utils@gnu.org; Wed, 05 Dec 2007 13:12:39 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Izyje-0004kb-Rk; Wed, 05 Dec 2007 13:12:38 -0500 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Izyje-0004Lx-Gc; Wed, 05 Dec 2007 13:12:38 -0500 Original-Received: from localhost ([127.0.0.1] helo=lola.goethe.zz) by fencepost.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IzyjX-00051J-VG; Wed, 05 Dec 2007 13:12:32 -0500 Original-Received: by lola.goethe.zz (Postfix, from userid 1002) id 390E11C3ACDE; Wed, 5 Dec 2007 19:12:23 +0100 (CET) In-Reply-To: <87hcix827c.fsf@penguin.cs.ucla.edu> (Paul Eggert's message of "Wed, 05 Dec 2007 09:45:59 -0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.50 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) 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:15313 gmane.emacs.devel:84740 Archived-At: Paul Eggert writes: > 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. No. 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. What _you_ mean is that in environments that _don't_ use diffs but rather interpret them as naked text, inconveniences might occur. But those will occur with any patch dealing with trailing white space in any manner, anyhow. > 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. Which only means that it is is wrong to interpret diff output with an unmodified trailing whitespace detection mode. Because diff files are not merely text. They carry a meaning. > So that is at least one good motivation for suppressing unnecessary > trailing white space. The trailing white space is not unnecessary since it is part of the format. > 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. diff-mode clearly is not such a one. > By the way, the diff that I sent in my previous email > > suppressed the trailing white space in question. Did you notice? I happen not to be a program. If I had used Emacs for actually dealing with the diff, I would have noticed. Isn't it quite nonsensical to ask this question? Would you be bothering messing with trailing whitespace in the first place if it was human-visible normally? > I've used this format for many months now, for patches that I send via > email. No problems have been reported with these patches. You mean, the mailing list thread on the Emacs developer list (which the request to change this back originated on) is just a figment of my imagination? No problem report triggered it? > And I send out my fair share of patches. The "patch" program deals with this format violation. Not everything else does, and people often repair patches instead of reporting them. -- David Kastrup, Kriemhildstr. 15, 44793 Bochum