From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: diff-mode misinterprets empty lines. Date: Tue, 19 Feb 2008 11:32:05 -0500 Message-ID: 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> <3n4pdrlshh.fsf@fencepost.gnu.org> <87odb41nru.fsf@stupidchicken.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1203438757 27581 80.91.229.12 (19 Feb 2008 16:32:37 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 19 Feb 2008 16:32:37 +0000 (UTC) Cc: emacs-devel@gnu.org To: Chong Yidong Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Feb 19 17:33:01 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JRVOk-0003Jr-BE for ged-emacs-devel@m.gmane.org; Tue, 19 Feb 2008 17:32:50 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JRVOF-00027l-Jg for ged-emacs-devel@m.gmane.org; Tue, 19 Feb 2008 11:32:19 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JRVOA-00025v-9R for emacs-devel@gnu.org; Tue, 19 Feb 2008 11:32:14 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JRVO9-00025C-IP for emacs-devel@gnu.org; Tue, 19 Feb 2008 11:32:13 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JRVO9-000253-5e for emacs-devel@gnu.org; Tue, 19 Feb 2008 11:32:13 -0500 Original-Received: from mercure.iro.umontreal.ca ([132.204.24.67]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JRVO8-0000re-Ln for emacs-devel@gnu.org; Tue, 19 Feb 2008 11:32:12 -0500 Original-Received: from hidalgo.iro.umontreal.ca (hidalgo.iro.umontreal.ca [132.204.27.50]) by mercure.iro.umontreal.ca (Postfix) with ESMTP id CE1902CF5E2; Tue, 19 Feb 2008 11:32:11 -0500 (EST) Original-Received: from faina.iro.umontreal.ca (faina.iro.umontreal.ca [132.204.26.177]) by hidalgo.iro.umontreal.ca (Postfix) with ESMTP id 9D03C3FE0; Tue, 19 Feb 2008 11:32:05 -0500 (EST) Original-Received: by faina.iro.umontreal.ca (Postfix, from userid 20848) id 89FB06C809; Tue, 19 Feb 2008 11:32:05 -0500 (EST) In-Reply-To: <87odb41nru.fsf@stupidchicken.com> (Chong Yidong's message of "Tue, 29 Jan 2008 13:37:25 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-DIRO-MailScanner-Information: Please contact the ISP for more information X-DIRO-MailScanner: Found to be clean X-DIRO-MailScanner-SpamCheck: n'est pas un polluriel, SpamAssassin (score=-2.82, requis 5, autolearn=not spam, ALL_TRUSTED -2.82) X-DIRO-MailScanner-From: monnier@iro.umontreal.ca X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:89578 Archived-At: >>> In an effort to clear FOR-RELEASE, here is a simple-minded attempt to >>> deal with this. It seems to fix the original problem at least. >> >> It is problematic when you try to apply a hunk via C-c C-a because any >> empty line following your hunk (e.g. the last hunk in a C-x v =) will be >> taken as being part of the hunk and C-c C-a will think that the original >> text was just missing a newline and will add it (as a result of its >> fuzzy matching feature). > Is there any progress on this issue, or is help needed? No progress. Help would be welcome. I think it mostly involves trying to use diff-sanity-checks (either the function itself or the ideas) at more places. E.g. diff-end-of-hunk should check that the place it found is consistent with the hunk header's numbers and if not (and if looking at an empty line) keep going further. But be careful also that diff-end-of-hunk (and other functions) is/are used in diff-fixup-modifs where the hunk header is presumed broken. > It seems to me that this is the last bug remaining the FOR-RELEASE, > although the release process is so opaque and confusing that I have > little idea what's going on. It was decided that this bug should not prevent the pretest. I would personally not hold the release for it either, so we already have diff-sanity-checks which takes care of the most serious problems already. Stefan